Results 1 to 4 of 4
Thread: How to execute external EXE?
- 02-13-2009, 02:45 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 3
- Rep Power
- 0
How to execute external EXE?
Hi,
I'm trying to make a GUI so that it can run a third-party command-line exe.
the command that I'm trying to work on is as follows on netbeans:
clic mp3play.gd -i c:\test.mp3
where:
clic is the main exe.
mp3play.gd -i is the parameter
test.mp3 is the actual file, which is the user input.
I have tried using runtime class. but it doesn't seem to work..
Thanks in advance
Pls do help me out.
- 02-13-2009, 07:15 PM #2
Maybe this will help:
When Runtime.exec() won't - JavaWorld
db
- 02-17-2009, 07:12 AM #3
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 12
Runtime.exec returns a process. Do a 'process.join' on that to ensure the process has finished. Then you can get the InputStream and error streams for the process to see what happened. But looking at what you have, my guess is you are trying to do something like
Java Code:Runtime.getRuntime.exec("clic mp3play.gd -i c:\test.mp3");
- 02-21-2009, 01:59 AM #4
Member
- Join Date
- Feb 2009
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 03:40 PM -
Using Runtime to execute external commands
By Java Tip in forum Java TipReplies: 0Last Post: 02-05-2008, 10:14 AM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 10:33 PM -
Execute Jar file
By barney in forum New To JavaReplies: 1Last Post: 08-07-2007, 08:13 AM -
why does not execute this?
By aleplgr in forum New To JavaReplies: 6Last Post: 08-01-2007, 12:37 PM
Bookmarks