I am writing a program, where i need to compile one java file from within another, on the fly.
the code is correct, and is working correctly under BlueJ. but when i export a jar file, or run it from the command-line, it gives me a null-pointer exception!! PLS HELP!!!
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if(compiler.run(null, null, null, "Hello.java") {} else {}