Does javax.tools depend on the JDK?

早过忘川 提交于 2019-11-30 14:22:02
Stephen Denne

JRE's need to include the interfaces, and classes in that package, but do not need to provide implementations.

Sun's JRE doesn't, and returns null from calling ToolProvider.getSystemJavaCompiler().

This other question addresses java 5.

Here's a blog post by Morten Nobel-Jørgensen on how to use eclipse's compiler as an implementation of javax.tools.JavaCompiler.

JavaCompiler javac = new EclipseCompiler();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!