Solved

Run another program from Java

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

How ?

Thanks.
0
Comment
Question by:greisch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

739 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