ubuntu12.04 tomcat7 无法启动,真的无法启动
java配置
export JAVA_HOME=/opt/jdk1.7.0_40
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib
bin/startup.sh
Using CATALINA_BASE: /home/xviubu/tomcat
Using CATALINA_HOME: /home/xviubu/tomcat
Using CATALINA_TMPDIR: /home/xviubu/tomcat/temp
Using JRE_HOME: /opt/jdk1.7.0_40/jre
Using CLASSPATH: /home/xviubu/tomcat/bin/bootstrap.jar:/home/xviubu/tomcat/bin/tomcat-juli.jar
没有错误输出,但是 ps aux | grep tomcat 没有进程
nmap localhost 没有8080端口,浏览器打不开
bin/shutdown.sh
Using CATALINA_BASE: /home/xviubu/tomcat
Using CATALINA_HOME: /home/xviubu/tomcat
Using CATALINA_TMPDIR: /home/xviubu/tomcat/temp
Using JRE_HOME: /opt/jdk1.7.0_40/jre
Using CLASSPATH: /home/xviubu/tomcat/bin/bootstrap.jar:/home/xviubu/tomcat/bin/tomcat-juli.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:60)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
我真的无法搞定了,昨天还好好的今天开机运行就不行了
深夜求助。。。。。。。。。。。。 tomcat ubuntu --------------------编程问答-------------------- export CLASSPATH=.;$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/dt.jar --------------------编程问答-------------------- export CLASSPATH=.;$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar --------------------编程问答-------------------- 这环境变量配得。。。。 --------------------编程问答--------------------
还是不行,我在找找看是哪错了 --------------------编程问答-------------------- 解决了,我把自己下载的java给卸载了,用了系统自带的,配置
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
就可以了,
补充:Java , Web 开发