Perhaps JAVA_HOME does not point to the JDK问题 (JDK1.6.0+ Tomcat5.0 时出现)
来源:互联网 发布:百度t8待遇 知乎 编辑:程序博客网 时间:2024/05/02 01:21
文章分类:Java编程
文章分类:Java编程
错误页面提示:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:315)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:406)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法。
安装tomcat的时候指定了jre的路径,导致tomcat_home, 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
产生的原因是java.home指到$JAVA_HOME/jre下了,而其lib下的tools.jar跟$JAVA_HOME/lib/tools.jar不一样,编译jsp的时候需要用到后者.
注: java.home在运行的时候就会指向$JRE_HOME.
jdk1.6.0_03
都会出现这种情况.
修改方法:在tomcat控制台(双击tomcate5w.exe)java选项-〉java virtual machine
设置为%java_home%/jre/bin/server/jvm.dll
tomcat控制台java选项-〉Java classpath:
%tomcat_home%/bin/bootstrap.jar;%java_home%/lib/tools.jar
注:%java_home%、%tomcat_home分别指jdk、tomcat的安装根目录
tomcat_home, 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
解决方案:
只要把JAVA_HOME/lib/tools.jar拷到TOMCAT_HOME/common/lib下,重启动Tomcat,OK
以上jdk1.6.0_03 +tomcat5.0.28出现上述现象,并按相应方法解决
错误页面提示:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:315)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:406)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法。
安装tomcat的时候指定了jre的路径,导致tomcat_home, 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
产生的原因是java.home指到$JAVA_HOME/jre下了,而其lib下的tools.jar跟$JAVA_HOME/lib/tools.jar不一样,编译jsp的时候需要用到后者.
注: java.home在运行的时候就会指向$JRE_HOME.
jdk1.6.0_03
都会出现这种情况.
修改方法:在tomcat控制台(双击tomcate5w.exe)java选项-〉java virtual machine
设置为%java_home%/jre/bin/server/jvm.dll
tomcat控制台java选项-〉Java classpath:
%tomcat_home%/bin/bootstrap.jar;%java_home%/lib/tools.jar
注:%java_home%、%tomcat_home分别指jdk、tomcat的安装根目录
tomcat_home, 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
解决方案:
只要把JAVA_HOME/lib/tools.jar拷到TOMCAT_HOME/common/lib下,重启动Tomcat,OK
以上jdk1.6.0_03 +tomcat5.0.28出现上述现象,并按相应方法解决
- Perhaps JAVA_HOME does not point to the JDK问题 (JDK1.6.0+ Tomcat5.0 时出现)
- eclipse3.1.2 +tomcat5.0 配置问题:Unable to find a javac compiler ;Perhaps JAVA_HOME does not point to the JDK
- android中,使用ant多渠道打包时出现Perhaps JAVA_HOME does not point to the JDK问题的解决方法
- Perhaps JAVA_HOME does not point to the JDK
- Perhaps JAVA_HOME does not point to the JDK的解决方法
- Perhaps JAVA_HOME does not point to the JDK的解决方法
- Perhaps JAVA_HOME does not point to the JDK
- Ant出错-Perhaps JAVA_HOME does not point to the JDK
- Perhaps JAVA_HOME does not point to the JDK
- Perhaps JAVA_HOME does not point to the JDK
- 解决Perhaps JAVA_HOME does not point to the JDK.
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK解决
- 错误处理 Perhaps JAVA_HOME does not point to the JDK. It is currently set to ....
- Ant Unable to find a javac compiler Perhaps JAVA_HOME does not point to the JDK 解决办法
- MyEclipse中运行Ant出错:Perhaps JAVA_HOME does not point to the JDK
- 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
- c/c++中运行外部程序或打开文件(转)
- 参考
- jsp验证码
- 捕获异常
- PHP 函数集合
- Perhaps JAVA_HOME does not point to the JDK问题 (JDK1.6.0+ Tomcat5.0 时出现)
- Android3.0开始关闭应用程序API 国内手机设计公司被迫出售
- 简单的后缀数组
- 特殊用法:添加小图标!-
- zend framework多模块配置
- JFreeChart 折线图_新手
- Void类型的指针-C语言
- eVC编程遇到的各种问题之——bmp文件
- DX学习前篇 (Win32窗口基础)(第一章)