How to add jvm options to tomcat on windows 7

前端 未结 3 1766
心在旅途
心在旅途 2021-02-10 07:59

How can I add jvm options to Tomcat on Windows 7?. By the way I am using Tomcat 7. I added my jvm options to first line of catalina.bat file but it didn\'t work. I

3条回答
  •  忘掉有多难
    2021-02-10 08:47

    Here you have my two cents,

    Use CATALINA_OPTS or JAVA_OPTS. You can set the jvm options in either one of these variables in catalina.bat file according to your requirement. Read the comments in catalina.bat file about these variables. You will understand

    EDIT after your comment

    1. Set the environment variable - project.home in windows environment using this link. Now, your env variable is set
    2. Set the JAVA_OPTS in setenv.bat (you need to create this file)

      set JAVA_OPTS="-Dproject.home"

    or

      set JAVA_OPTS="%JAVA_OPTS% -Dproject.home"
    

    for safety purpose. This will prepend the existing JAVA_OPTS with the new value.Start the server. Always, use UPPERCASE LETTERS, NUMBERS AND UNDERSCORE for environment variables. This is for portability reasons.

提交回复
热议问题