JavaCompilerobject giving an error WITHOUT ide
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")
Re: JavaCompilerobject giving an error WITHOUT ide
Its tough to give any advice given the code posted and a lack of any stack trace that references said code. Recommend you post an SSCCE which clearly demonstrates the problem.
it gives me a null-pointer exception