exec() locks
843798Aug 2 2001 — edited Aug 3 2001I need to run an application from inside java.
So, I wrote this code, but the first time I run it, I used
the 'calc' instead of 'notepad'.
Now, it always calls the calculator, not the notepad.
Even after closing the application and rebooting de computer.
Can anyone help me?
Tanks.
public static void main(String[] args)
{
Runtime s = Runtime.getRuntime();
try
{
Process q = s.exec("notepad");
q.waitFor();
}
catch(Exception ex)
{
System.out.println(ex.getMessage());
}
}