1

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?

Joba
  • 777
  • 7
  • 24
  • 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 Answers1

0

The compiler is only present in JDKs, not in JREs.

user207421
  • 305,947
  • 44
  • 307
  • 483