Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running an external Program

Status
Not open for further replies.

viclap

Programmer
Oct 12, 2000
39
PH
Hi to all,

How do I run an external program locally in Java similar to run or shell commands in other programming languages?

Thanks in advance. [sig][/sig]
 
Use java.lang.Runtime....

[tt]try {
[tab]Runtime.getRuntime().exec("program.exe");
}
catch (java.io.IOException ex) {
[tab]System.out.println("IO Exception!");
}
[/tt] [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
Thank you very much......I'll try it....

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top