Thread View: alt.comp.lang.java-games
2 messages
2 total messages
Started by Marco
Mon, 28 Apr 2003 13:48
Run external application from Java
Author: Marco
Date: Mon, 28 Apr 2003 13:48
Date: Mon, 28 Apr 2003 13:48
11 lines
2074 bytes
2074 bytes
I would like to run external applications from a java code. My case is that I'd like to run Windows Media Player through a Java code line. Could you help me? Thank You. Marco. marco_zanardi@libero.it
Re: Run external application from Java
Author: Joshua King
Date: Tue, 29 Apr 2003 03:25
Date: Tue, 29 Apr 2003 03:25
16 lines
2016 bytes
2016 bytes
Marco wrote:
> I would like to run external applications from a java code.
> My case is that I'd like to run Windows Media Player through a Java code
> line.
See an example of this here:
http://developer.java.sun.com/developer/JDCTechTips/2003/tt0304.html#1
Essentially you have to write runtime.exec("mplayer.exe");
You'd have to replace the command with something like 'mplayer.exe' (you
may have to specify the path) rather than 'ls' and the code would only
work on your windows (or one with matching file names and positions) -
which defeats the purpose of Java?
Joshua King
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads