File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Executing an external application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executing an external application" Watch "Executing an external application" New topic
Author

Executing an external application

Mohammad Talha
Greenhorn

Joined: Mar 15, 2002
Posts: 1
Hello,
is there any way by which we can execute an external file in the system whilst running the java program?
Matt Senecal
Ranch Hand

Joined: Dec 01, 2000
Posts: 255
Sure. If "PATH_TO_TARGET" is a String that is the path to the external application (ex: "C:\Files\Temp\Test.exe"), you can run it this way:
Runtime.getRuntime().exec(PATH_TO_TARGET);
[ June 26, 2002: Message edited by: Matt Senecal ]

There's nothing more dangerous than a resourceful idiot. ---Dilbert
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Executing an external application
 
Similar Threads
read a property file to set variables using javascript
How do you turn on "Verbose" option for Ant in Eclipse plugin?
math vector operation
where to put J2EE transaction handling
can we make component reusable in javascript?