在eclipse下启动tomcat调试jsp报出JAVA_HOME没有指向JDK的错误
2007-05-16 19:53
633 查看
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
所报错误如上,解决问题过程如下:
1.使用Eclipse3.2+Tomcat5.0 以及 MyEclipse 5.1.1 GA(已经合成了jre,eclipse和myeclipse插件包)两种环境下进行了调试,发现问题都一样。
2.运行CMD,编译运行了一个hello world.java ,确认环境变量设置正常。
3.怀疑是IDE中的默认设置出了问题。在Eclipse的Project Explorer下,右键点击所创建的WEB 应用web_test,选中Properties,弹出Properties for web_test 的视图,选中其中的 Java Compiler 此项目,发现问题出来了。 默认的JDK Compliance 下 Compiler compliance level 选项 为1.3, Use deafault compliance settings 项目下的选项 Generated .class files compatibility : 和 Source compatibility : 两项也都为 1.3 ,而报错的时候也提示版本不对, 我在机器上安装的是JDK1.4,JAVA_HOME等环境变量设定没有问题, 问题是 运行的Eclipse 下新建的WEB Project 默认的Project Properties 中定位的JRE 是1.3 版本的。 把上面的三个选项全部改为和本机JRE匹配的 1.4版 ,问题解决!
Perhaps JAVA_HOME does not point to the JDK
所报错误如上,解决问题过程如下:
1.使用Eclipse3.2+Tomcat5.0 以及 MyEclipse 5.1.1 GA(已经合成了jre,eclipse和myeclipse插件包)两种环境下进行了调试,发现问题都一样。
2.运行CMD,编译运行了一个hello world.java ,确认环境变量设置正常。
3.怀疑是IDE中的默认设置出了问题。在Eclipse的Project Explorer下,右键点击所创建的WEB 应用web_test,选中Properties,弹出Properties for web_test 的视图,选中其中的 Java Compiler 此项目,发现问题出来了。 默认的JDK Compliance 下 Compiler compliance level 选项 为1.3, Use deafault compliance settings 项目下的选项 Generated .class files compatibility : 和 Source compatibility : 两项也都为 1.3 ,而报错的时候也提示版本不对, 我在机器上安装的是JDK1.4,JAVA_HOME等环境变量设定没有问题, 问题是 运行的Eclipse 下新建的WEB Project 默认的Project Properties 中定位的JRE 是1.3 版本的。 把上面的三个选项全部改为和本机JRE匹配的 1.4版 ,问题解决!
相关文章推荐
- eclipse需要的环境变量就两个,一个是java_home指向JDK。另一个是Tomcat,自己去preference-sever下new一个
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- 关于tomcat不能启动的问题(NB:JAVA_HOME should point to a JDK not a JRE)
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- 关于tomcat不能启动的问题(NB:JAVA_HOME should point to a JDK not a JRE)
- Eclipse启动错误:A Java Runtime Environment(JRE) or Java Development Kit(JDK) must be available……
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- JDK 1.8 启动 Eclipse 报Java was started but returned exit code=13...错误
- Eclipse正在使用Ant扑灭Android数据包错误的解决方案 – Perhaps JAVA_HOME does not point to the JDK
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 错误&&Eclipse 访问tomcat首页报404错误
- tomcat启动web应用没有错误,但是访问JSP页面报空指针错误
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- TOMCAT启动提示NB: JAVA_HOME should point to a JDK not a JRE解决
- Tomcat启动startup.bat一闪而过提示Java_home设置错误的解决办法
- Ubuntu下tomcat或eclipse启动提示没有java环境问题
- 为什么我的Eclipse在单步调试Tomcat项目时没有Java源代码同步显示?
- 关于tomcat不能启动的问题(NB:JAVA_HOME should point to a JDK not a JRE)
- TOMCAT启动提示NB: JAVA_HOME should point to a JDK not a JRE解决