File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Executing an external application

Mohammad Talha

Joined: Mar 15, 2002
Posts: 1
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:
[ June 26, 2002: Message edited by: Matt Senecal ]

There's nothing more dangerous than a resourceful idiot. ---Dilbert
I agree. Here's the link:
subject: Executing an external application