51Testing软件测试论坛

标题: 新人求助 JDK问题 [打印本页]

作者: macelo    时间: 2007-3-2 11:40
标题: 新人求助 JDK问题
遇到这样错误了
500 Servlet Exception
Resin can't load com.sun.tools.javac.Main.  Usually this means that the
JDK tools.jar is missing from the classpath, possibly because of using
a JRE instead of the JDK.  You can either add tools.jar to the classpath
or change the compiler to an external one with <java compiler='javac'/>
or jikes.

java.lang.ClassNotFoundException: com.sun.tools.javac.Main
作者: wuhuawu09    时间: 2007-3-2 11:57
好象没有设置环境变量吧??
作者: macelo    时间: 2007-3-2 12:40
我是linux系统

在/etc/profile 加入的环境变量是:
export JAVA_HOME=/usr/java/j2sdk1.4.2_04
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
作者: wuhuawu09    时间: 2007-3-2 14:28
我没用过linux装过,但也要把 tools.jar加到环境变量里...要不然执行javac时就找不到有些类 ...
作者: macelo    时间: 2007-3-2 18:09
应该不是这问题把
我编译的小程序 HelloWrord
用java 都可以正常显示




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2