Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

exec() locks

843798Aug 2 2001 — edited Aug 3 2001
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());
}

}

Comments

843798

Sorry!
I've found out what I was doing wrong.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 31 2001
Added on Aug 2 2001
1 comment
78 views