jdk与tomcat的环境变量问及测试

来源:百度知道 编辑:UC知道 时间:2024/06/07 00:24:24
我的JDK与TOMCAT的环境变量都设置完了,在测试JDK时没有问题,自己写一段小程序测试的,在测试TOMCAT时我录入 http://localhost:8080也能进去TOMCAT的应当界面,但是在我写程序时放入到webapps文件夹中的myapp中在运行http://localhost:8080/myapp/index.jsp就报错误 错误提示是:
description The server encountered an internal error () that prevented it from fulfilling this request.

root cause

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.chinaunix.net/u/21684/showart_195064.html

Perhaps JAVA_HOME does not point to the JDK

JAVA_HOME错了,应该指向JDK

这个问题就是你设置的JAVA_HOME和path系统环境变量的问题。根据提示,tomcat在编译jsp文件时,找不到java的编辑器javac。你这样解决,cmd(命令行),然后使用命令:set j (查看你JAVA_HOME变量的设置),然后在看看你的path变量情况:set p,看看有没有指向你的$JAVA_HOME/bin的路径,记着windows下路径的分割符:“;”,分号(半角)。你的问题,就是这个原因,没有什么大问题,tomcat给的提示非常清楚。希望对你有所帮助。

广雅书苑
www.gyabooks.com

根目录错了吧!项目名是叫myapp么 ,要写绝对路径的

Perhaps JAVA_HOME does not point to the JDK
没有JAVA_HOME?

Unable to find a javac compiler;

你编译呢?????