Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

calling an .exe form a java program

  Asked By: Asksuresh    Date: Sep 16    Category: Java    Views: 1014
  

I have a question , how can I call an .exe file from a
java program,
I need its code.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Camille Garrett     Answered On: Sep 16

have a look at the class Runtime and in particular at its methods exec
() ; they offer an awful lot of ways to start any external program.

 
Answer #2    Answered By: Olivia Campbell     Answered On: Sep 16

You can use System.exec() to call  the exe..

 
Answer #3    Answered By: Hariz Burki     Answered On: Sep 16

try
{
Runtime.getRuntime().exec("program.exe");
}
catch (IOException exc)
{
......
}

 
Answer #4    Answered By: Bien Nguyen     Answered On: Sep 16

It is in the process command
Runtime r = Runtime.getRuntime();
Process p = r.run();

 
Didn't find what you were looking for? Find more on calling an .exe form a java program Or get search suggestion and latest updates.




Tagged: