JAVA_HOME settings, JAVA_HOME settings
1. Permanent modification, effective for all users (this is not recommended for Oracle and other users)
# vi /etc/profile
Export JAVA_HOME =/usr/local/jdk1.8.0 _ 20/
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
[Note]: If you want to change the file to take effect immediately, run # source/etc/profile
2. Permanent modification, valid for a single user
$ Vi/home/myuser/. bash_profile // Add the following content at the end of the file
Export JAVA_HOME =/usr/local/jdk1.8.0 _ 20/
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
[Note]: If you want to change the file to take effect immediately, run # source/home/myuser/. bash_profile
3. Only effective for the current bash/shell
Export JAVA_HOME =/usr/local/jdk1.8.0 _ 20/
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Java_home settings
Khan ~~ This is a classic problem.
I'm afraid many people do not know that TOMCAT has a small detail on HOME settings.
In an environment variable, the variable value cannot be followed by ";", that is, the variable value cannot be a plus sign. You can try again.
In addition, I also use TOMCAT for WEB. I hope this answer will help you.
What version of TOMCAT are you using?
Java_home settings
Khan ~~ This is a classic problem.
I'm afraid many people do not know that TOMCAT has a small detail on HOME settings.
In an environment variable, the variable value cannot be followed by ";", that is, the variable value cannot be a plus sign. You can try again.
In addition, I also use TOMCAT for WEB. I hope this answer will help you.
What version of TOMCAT are you using?