Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.tools.JavaCompiler requires tools.jar?

843810Apr 17 2007 — edited Oct 16 2007
Hi everybody,

I am trying to use the new compiler API in javax.tools but get a null reference back from ToolProvider.getSystemJavaCompiler().

If I add tools.jar to the classpath the program runs fine. However, since my app is commerical and I don't think I can distribute tools.jar with it, this is no solution for me. Also, (to me) it sounds silly to make javax.tools a core API if you need a jdk to run it.

I hope this question hasn't been asked to many times before, I really tried searching this (and a zillion other) forums without success.

Thanks,
Erik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2007
Added on Apr 17 2007
4 comments
230 views