Solved

Run another program from Java

Posted on 2002-07-10
2
145 Views
Last Modified: 2010-03-31
I want to launch a .EXE with arguments from Java.

How ?

Thanks.
0
Comment
Question by:greisch
  • 2
2 Comments
 
LVL 9

Expert Comment

by:Venci75
ID: 7145356
use
Runtime.getRuntime().exec()
0
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
ID: 7145361
you can use for example:
Runtime.getRuntime().exec("prog.exe param1 param2 param3");

or
String[] cmd = new String[3];
cmd[0] = "prog.exe";
cmd[1] = "param1";
cmd[2] = "param2";
Runtime.getRuntime().exec(cmd);
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
json example 39 116
wordmultiple challenge 12 93
Non-recursive backtracking, using a stack 1 53
Java Jpanels and Jframe 8 21
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now