How does JAVA specify the JDK path
This article introduces the knowledge of "JAVA how to specify JDK path". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Tomcat finds JAVA_HOME and JRE_HOME in the system environment variables by default. But sometimes we need different versions of JDK to coexist.
JAVA_HOME and JRE_HOME can be set at the top of ${TOMCAT_HOME}/bin/catalina.bat.
For example:
12set JAVA_HOME=E:\Program Files\Java\jdk1.7.0_65set JRE_HOME=E:\Program Files\Java\jre7
Or modify the ${TOMCAT_HOME}/bin/setclasspath.bat file to add
1set "JAVA_HOME=C:\Program Files (x86)\Java\jdk_1.6_31_64"
Tomcat configuration connection jdk path ${TOMCAT_HOME}/bin/catalina.sh or setenv.sh file under linux:
1export JAVA_HOME=/usr/java/jdk1.7.0_55
In addition, sometimes it is necessary to set the maximum memory of Tomcat, as follows:
Add to catalina.bat
123456 Under windows add: set JAVA_OPTS=%JAVA_OPTS% -server -XX:PermSize=128M -XX:MaxPermSize=512m Under linux add: JAVA_OPTS="-Xms256m -Xmx512m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m"
"JAVA how to specify JDK path" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!