Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOMEexceptionorg.apache.jasper.JasperException:Unable to compile class for JSPorg.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 11:02:00
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOMEexceptionorg.apache.jasper.JasperException:Unable to compile class for JSPorg.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME
exceptionorg.apache.jasper.JasperException:Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
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:802)
root causeUnable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
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:802)
我的电脑重做系统之后,myeclipse、oracle、tomcat 5.0都是重新装的,安装完成之后jsp页面打不开,报出以上错误,我的jsp代码没错.
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOMEexceptionorg.apache.jasper.JasperException:Unable to compile class for JSPorg.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler
JDK配置找不到
教你一招 不管系统咋个重装都能用的办法
在配置文件中指定 VM路径
就是你安装的JDK路径
比如myeclipse 目录下的eclipse.in文件在第一行加入 -vm
JDK路径
就OK了
其他的同
ORCLE的话 不得行
必须重装
那个涉及到很多系统相关的东西 不重装 目前我还真不知道有其他办法