JDK environment variable ( Ubuntu 12.04) with tomcat
In Ubuntu,i set jdk environment(JAVA_HOME,JRE_HOME), and java -version can
use. but i can start up tomcat. some info :
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
environment set /etc/profile
JAVA_HOME=/opt/jvm/java/jdk1.7.0_25
JRE_HOME=/opt/jvm/java/jdk1.7.0_25/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME
export JAVA_HOME
export JRE_HOME
export PATH
logs
sunshanming@sunshanming-vm1:~$ sudo /opt/apache-tomcat-7.0.42/bin/startup.sh
[sudo] password for sunshanming:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
sunshanming@sunshanming-vm1:~$ echo $JAVA_HOME
/opt/jvm/java/jdk1.7.0_25
sunshanming@sunshanming-vm1:~$ echo $JRE_HOME
/opt/jvm/java/jdk1.7.0_25/jre
sunshanming@sunshanming-vm1:~$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
No comments:
Post a Comment