Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME
2014-09-09 09:52
786 查看
在eclipse下,使用tomcat插件时,一切都设置妥当,包括classpath,java_home都设置好了,可是访问.jsp文件时,报告以下错误:
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
解决方案网址:http://blog.csdn.net/Think2Exist/archive/2004/10/08/128411.aspx
经过探索发现问题出在Eclipse 3启动Tomcat时的Classpath上,tools.jar在Tomcat启动时需要,但现在找不到(事实上系统变量Classpath已经指明了 tools.jar所在),系统是去JRE的lib下找,可是这个包默认应该在[JDK]的lib下(注:用的是JDK build 1.4.2_03-b02),问题的解决很简单,只要复制[JDK].jar到[JRE]下即可。
解决方案有二:
1.找到jdk的lib目录下的tools.jar,拷贝到tomcat的common目录下即可
2. 打开eclipse,在菜单windows->preferences->tomcat->jvm settings,在classpath栏下添加tools.jar即可。
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
解决方案网址:http://blog.csdn.net/Think2Exist/archive/2004/10/08/128411.aspx
经过探索发现问题出在Eclipse 3启动Tomcat时的Classpath上,tools.jar在Tomcat启动时需要,但现在找不到(事实上系统变量Classpath已经指明了 tools.jar所在),系统是去JRE的lib下找,可是这个包默认应该在[JDK]的lib下(注:用的是JDK build 1.4.2_03-b02),问题的解决很简单,只要复制[JDK].jar到[JRE]下即可。
解决方案有二:
1.找到jdk的lib目录下的tools.jar,拷贝到tomcat的common目录下即可
2. 打开eclipse,在菜单windows->preferences->tomcat->jvm settings,在classpath栏下添加tools.jar即可。
相关文章推荐
- 问题:Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK(转
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK.
- 解决com.sun.tools.javac.Main is not on the classpath / Unable to find a javac compiler 的问题
- unable to find javac compiler;com.sun.tools.javac.Mainisnotontheclasspath的问题的解决
- com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- ant 手动打包报错: com.sun.tools.javac.Main is not on the classpPerhaps JAVA_HOME does not point to the JDK
- ant 解决com.sun.tools.javac.Main is not on the classpath的问题
- 【cocos2dx】编译安卓平台遇到报错 com.sun.tools.javac.Main is not on the classpath
- jdk重装后com.sun.tools.javac.Main is not on the classpath的问题 .
- 解决com.sun.tools.javac.Main is not on the classpath的问题
- 解决com.sun.tools.javac.Main is not on the classpath的问题
- ant中com.sun.tools.javac.Main is not on the classpath问题的解决方案
- 解决com.sun.tools.javac.Main is not on the classpath的问题
- ant报错: 解决com.sun.tools.javac.Main is not on the classpath的问题
- 解决com.sun.tools.javac.Main is not on the classpath的问题
- ant 解决com.sun.tools.javac.Main is not on the classpath的问题
- com.sun.tools.javac.Main is not on the classpath.错误解决方法
- Ant Unable to find a javac compiler Perhaps JAVA_HOME does not point to the JDK 解决办法