Process process2 = Runtime.getRuntime().exec(new String[]{"javac","-g:vars","/Users/amol/Documents/Java/a.java"});
Process process3 = Runtime.getRuntime().exec(new String[]{"javap","-l","-c","/Users/amol/Documents/Java/a"});
I tried to run this code but I am facing a strange problem. It compiles correctly (means the first line compiles the program) but the second line gives an error saying that 'a' not found. However when I checked the given directory a.class file was created correctly. How should I correctly run the second line?