title: JavaCompiler returning null
body: <p>I am creating a program along the lines of Codingbat.com.</p>
  
  <p>During Runtime, it needs to compile code, and then execute it. This has all been handled.
  Currently, I am forced to use the JavacTool, which requires it to be packed alongside.</p>
  
  <p>I have 2 basic questions:</p>
  
  <p>1) How can I stop the ToolProvider.getSystemJavaCompiler() from returning null when ran from an executable jar?</p>
  
  <p>2) If the above is not possible, is there a way to add the jar of  com.sun.tools.javac.api.JavacTool; without having it as a referenced library, so that it acts like a regular import?</p>
  
  <p>Thanks for answering this, if you would like, I could upload the Jar with the referenced library, and the jar without it.</p>
  
  <p>Just to be clear, the one with the referenced library works, but it is way to large, and slower then the jar that is ran through eclipse, that uses the JavaCompiler, not the JavacTool</p>
  
  <p>Thanks</p>
  
  <p>Edit:</p>
  
  <p>I am pretty sure this is possible with java as I have seen it before, yet forget where and how.</p>