all am working a project for compiling and running a java source code via my application.
here am stuck will explain my environment here..
java 1.6.0_35 32bit and eclipse indigo using operating system windows 64 bit
when i used this code
String command = "javac "+file.getAbsolutePath();
System.out.println(command);
Process p = Runtime.getRuntime().exec(command);`
got this exception ..think error show file doesnt exist but i checked it,which is here and when i execute via command line which compiles,but the eclipse shows this error
java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)`
can anyone fix this ,i tried a lot ..
javacis not in your path. I would try using the full path name to the javac.