The Java Compiler API does not work I keep getting unable to resolve class javax.tools.JavaCompilerTool and other similar ones

I have read that Java 6 has a compiler api which allows you to compile java files from other java code. However whenever I try to import any such class (eg javax.tools.JavaCompilerTool), I get a unable to resolve class javax.tools.JavaCompilerTool I searched in all the jar files in the jdk1.6.0_26 installation directory and found no reference to JavaCompilerTool in any jar file in the package javax.tools. My understanding is that this functionality is in the 1.6 JDK. I am running my application with the java.exe from the \bin directory and not the \jre\bin directory but regardless neither work. What am I missing? How can the class not be found.
Is that a compiletime or runtime error? (I don't recognize it being a compiletime one from Oracle). If runtime, how exactly are you running it? As a webapp on a servletcontainer or something? If so, are you sure the servletcontainer is using the JDK's JRE?

以上就是The Java Compiler API does not work I keep getting unable to resolve class javax.tools.JavaCompilerTool and other similar ones的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏