exec() locks

I 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());

}

}

[613 byte] By [jcsf] at [2007-9-26 2:50:12]
# 1
Sorry! I've found out what I was doing wrong.
jcsf at 2007-6-29 10:36:38 > top of Java-index,Desktop,Runtime Environment...