I am trying to compile and run java files from java code. I have a compiled java class and with this, try to compile java code. below is my code, but I don't see *.class file in either bin (in eclipse project out put folder) or in source place. Where has gone my *.class file if my compiler success. Or what is the wrong with my code? Trying in below 2 ways:
public class CompilerClass {
public static void main(String[] args) throws Exception {
Process p = Runtime.getRuntime().exec("javac com.java.Compileable.java");
ProcessBuilder pb = new ProcessBuilder("javac", "com.java.Compileable.java");
}
}