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!

exec and waitFor()

843798Dec 11 2001 — edited Feb 14 2002
Greetings.

I run the Runtime.exec() command with a relatively long (240 chars +) command on NT. When I run this command from Java and do a waitFor() on the process it blocks forever. This supposedly indicates the process is not over and/or the application is not responding. However, when I run the same command from the command line it works fine - implies application is fine.

However, when I reduce the length of the command (reduce the path length of the i/p files etc) it works fine.

From what I see, there seems to be a problem with the length of the command sent via rt.exec(). Is this true? Is there a way around this problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2002
Added on Dec 11 2001
4 comments
170 views