I'm currently trying to compile and execute code at runtime. Everything worked perfectly fine in my IDE (Netbeans), but as soon as I exported my code as a .jar file ToolProvider.getSystemJavaCompiler() returned null. Is there a reason why this is working in Netbeans but not in the .jar file?
Asked
Active
Viewed 583 times
1
-
Possible duplicate of [ToolProvider.getSystemJavaCompiler() returns null - usable with only JRE installed?](http://stackoverflow.com/questions/15513330/toolprovider-getsystemjavacompiler-returns-null-usable-with-only-jre-install) – amaidment Mar 14 '17 at 13:01
1 Answers
0
The compiler is only present in JDKs, not in JREs.

user207421
- 305,947
- 44
- 307
- 483
-
I am aware of that, but is that the reason why it's not working in a .jar? – Joba Dec 09 '14 at 22:19
-
And it already worked about half a year ago on a different system in a .jar file. – Joba Dec 09 '14 at 22:40