How to compile a java program from inside another java program
Suppose you need to compile HelloWorld.java and run from another program
here is a code
Runtime r=Runtime.getRuntime();
Process p=r.exec("javac HelloWorld.java");
p.waitFor();
Process run=(Runtime.getRuntime).exec("java HelloWorld");
No comments:
Post a Comment