Hi All!
I am trying to run a batch file �Mine.bat� from
Java file �Helpme.java� I have written in batch file
D:\
cd javadoc
javac Myprog.java
java Myprog
But when I try to run it (�Mine.bat�) from �Helpme.java� by using,
String str[]={�Mine.bat�};
Process proc;
try{
proc=Runtime.getRuntime().exec("str");
}catch(Exception e){
System.out.println("Exception is raised");
}
The out put results in only the change of Path that is from c:\ it goes to D:\ and program stops instead of running whole Mine.bat, plz tell me what to do? My goal is to compile another java file that is �Myprog.java� from �Helpme.java�.
Files contain in the following directories.
C:\Mine.bat
C:\ Helpme.java
D:\javadoc\Myprog.java
I am using Windows me
I will wait for reply.
bye