当我从Java 6迁移到Java 8(webApp)时,我调用Axis服务时出现此错误。它只出现在第一次通话中。
ERROR org.apache.axis.components.compiler.Javac: No compiler found in your classpath! (you may need to add 'tools.jar')
java.lang.ClassCastException: com.sun.tools.javac.main.Main$Result cannot be cast to java.lang.Integer
将jar JAVA_HOME / lib / tools.jar添加到类路径并不会改变任何内容。 JAVA_HOME总是指向JDK。
似乎在Java 7中工作。
答案 0 :(得分:1)
如果找不到编译器,您可能使用的是JRE
而不是JDK
。
只有Java Development Kit
包含java编译器。