Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Execute in Java

  Asked By: Cory    Date: Jun 17    Category: Java    Views: 851

I want to execute a exe in java.
like in VB we have shell("calc.exe") ,which executes calc ,
I will be waiting for your reply



2 Answers Found

Answer #1    Answered By: Alvin Nguyen     Answered On: Jun 17

Get an instance of Runtime, then call appropriate execute  method.
for eg.
Runtime rt = Runtime.getRuntime ();
Process process = rt.exec ( input );

Answer #2    Answered By: Jackson Bouchard     Answered On: Jun 17

Runtime.getRuntime().exec("bla bla");

Didn't find what you were looking for? Find more on Execute in Java Or get search suggestion and latest updates.