Jsp运行时报错:“Unable to find a javac compiler ”
来源:互联网 发布:mac系统怎么安装软件 编辑:程序博客网 时间:2024/05/18 06:28
今天配置Jsp环境变量,因为我前一段时间刚把Servlet囫囵吞枣地看了一遍,自己又用servlet写了一个学生档案管理系统,因为Jsp在tomcat的运行中会自动编译成Servlet,所以我觉得没有必要在去修改什么环境变量,于是我找来一个jsp代码,先运行下看看,结果不行。于是我又按照书本上介绍的把Path路径加上 %JAVA_HOME%/bin,结果还是不行。tomcat始终在报错:
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
说是没有找到javac 编译器,可是我明明把Path给改成了JDK的bin目录下了啊。于是我又把JDK bin目录下的javac 拷到Tomcat目录下的bin目录里面,重启tomcat服务器,还是不能运行jsp。这时候我就开始从网上查找原因。果然,网络是个好东西啊,他和我有着同样的原因,他的解决方案是在tomcat的Properties里面的Java Classpath里面加上了%JAVA_HOME%/lib/tools.jar;于是我按照他的方案试了一下,成功了。可是不知道为什么我按书上的方法去修改路径而无效。现在把这位仁兄的方案与大家共享吧。
原文地址:http://blog.zxlm.cn/show-38-1.html
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
说是没有找到javac 编译器,可是我明明把Path给改成了JDK的bin目录下了啊。于是我又把JDK bin目录下的javac 拷到Tomcat目录下的bin目录里面,重启tomcat服务器,还是不能运行jsp。这时候我就开始从网上查找原因。果然,网络是个好东西啊,他和我有着同样的原因,他的解决方案是在tomcat的Properties里面的Java Classpath里面加上了%JAVA_HOME%/lib/tools.jar;于是我按照他的方案试了一下,成功了。可是不知道为什么我按书上的方法去修改路径而无效。现在把这位仁兄的方案与大家共享吧。
原文地址:http://blog.zxlm.cn/show-38-1.html
费了我好几天时间,今天终于调好了。在tomcat设置中加入JAVA_HOME/lib/tools.jar就行了,如下图
thanks a lot,刚刚碰到,在tomcat 5.0.16中是把tools.jar拷入tomcat的common/lib目录中,到了5.0.28就不行了. ]
thanks,我的问题也解决了:
我是在Eclipse中通过Ant运行cactus测试taglib时遇到的问题:
[junit] Unable to find a javac compiler;
[junit] com.sun.tools.javac.Main is not on the classpath.
[junit] Perhaps JAVA_HOME does not point to the JDK
可是,在外部控制台用Ant调用测试就没问题。我的Tomcat 5.0.27,Ant 1.6.5。
我把tools.jar拷入tomcat的common/lib目录中,问题就解决了。
图片附件:
- Jsp运行时报错:“Unable to find a javac compiler ”
- JSP页面运行时出现 Unable to find a javac compiler 原因和解决方法
- Unable to find a javac compiler
- Unable to find a javac compiler
- Unable to find a javac compiler
- Unable to find a javac compiler,
- Unable to find a javac compiler---JBOSS
- Unable to find a javac compiler错误之解决办法
- eclipse ant 的时候 Unable to find a javac compiler
- java 调 ant 出现 Unable to find a javac compiler
- web maven jetty Unable to find a javac compiler
- build.xml:278: Unable to find a javac compiler;
- build.xml:278: Unable to find a javac compiler;
- 编译opencv3.1.0时报错unable to find a javc compiler
- 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解决
- Ant Unable to find a javac compiler Perhaps JAVA_HOME does not point to the JDK 解决办法
- 环境变量设置无误,但Tomcat仍报“Unable to find a javac compiler”错误的排除
- ASCII 字符表
- JS+CSS和图片美化下拉列表选择框
- 风云三国游戏检测
- ant url path pattern
- 利用Myeclipse快速开发struts应用程序
- Jsp运行时报错:“Unable to find a javac compiler ”
- JSP/Servlet: TagSupport 类别
- 时间转换成小时,天
- Windows 2008服务器管理应用之角色配置
- 程序集——.NET 框架应用程序构造块
- DBA2.0的时代 - DBA将向何处去?
- 我日
- 函数默认值的设置放在声明的时候,在定义的时候如果设置默认值,编译会出错
- .net事务