Solved

Run another program from Java

Posted on 2002-07-10
2
146 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 71
what is the difference between "sudo su" and "su - root" 6 102
micro services vs rest web services 16 81
eclipse argument 14 53
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

929 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