Click to See Complete Forum and Search --> : How to compile program at runtime?


Kah Yee
July 23rd, 1999, 01:39 AM
What methods to use to compile/run a program in another program at runtime??

Thanks for any replies.

Kah Yee
leekahye@comp.nus.edu.sg

July 26th, 1999, 02:17 PM
Use the java.lang.Runtime class

String s = "javac Test.java";
Runtime r = Runtime.getRuntime();
r.exec(s);