× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes, "start" is an internal command that cmd.exe, just like "dir" is. A common 
way to use it is "start mumble.doc"; this looks at the ".doc" extension and 
finds that it's linked to MS Word, so it starts Word. All the information it 
needs is in the registry somewhere. And it also understands common protocols 
like http: (starts your default browser) and mailto: (starts your default mail 
program).

To use DOS internal commands like "start" from Java, you do this:

Process ps = rt.exec("cmd /c start mumble.doc");

And it's mandatory in Java forums to post this link for anybody who asks about 
Runtime.exec:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Good luck
PC2

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On 
Behalf Of Dan
Sent: October 27, 2005 09:19
To: Java Programming on and around the iSeries / AS400
Subject: Re: Questions on "Calling PC Commands from RPG" article

cmd.exe "understands" Start. (I'm guessing Start is an "internal" command, like 
the DIR command? On a command line, type "Start /?" to see a description; I 
didn't see anything that might relate to the current issue.) I tried "Start 
winword.exe" from cmd.exe, and Word started up fine. Did the same using the 
java program, and got the same IO exception error.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.