Hi everyone,
Sorry to bother you guys but what if i want to run the class file that i have already compiled.
Let's say if my compiled class is located at C:/JButtons.class
and if i want to run this class this is what i did
Code:
String[] str12 ={"C:/j2sdk1.4.2_04/bin/java", "C:/JButtons"};
Runtime Runtime1;
Process Process1;
try
{
Runtime1 = Runtime.getRuntime();
Process1 = Runtime2.exec(str12);
Process1.waitFor();
}
catch(Exception e)
{
e.printStackTrace();
} There is no exception thrown but the exit value of the process is 1 (meaning the program exited abnormally). I do not know what i am doing wrong. Am i running the compiled class the correct way. If not then what is the correct way of doing it. The program i trying to run has no errors when compiled.
I hope some someone can help me with this problem
Any help is greatly appreciated
Thank You
Yours Sincerely
Richard West