Article View: alt.comp.lang.java-games
Article #3Re: Run external application from Java
From: 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
Technical Details
Message-ID:
<b8krcd$cgr$1@enyo.uwa.edu.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news1.optus.net.au!optus!news.uwa.edu.au!not-for-mailReferences:
<8jara.73691$iy5.2239006@twister2.libero.it>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d861,55a5fa1f7513da1a X-Google-Attributes: gid10d861,public X-Google-Thread: fc538,55a5fa1f7513da1a X-Google-Attributes: gidfc538,public X-Google-Thread: 1033cf,7c281227a1a74423 X-Google-Attributes: gid1033cf,public X-Google-Thread: 10d6db,55a5fa1f7513da1a X-Google-Attributes: gid10d6db,public X-Google-ArrivalTime: 2003-04-28 20:26:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news1.optus.net.au!optus!news.uwa.edu.au!not-for-mail From: Joshua King <jkingkard@SPAM.hotmail.com> Newsgroups: alt.comp.lang.java-games,alt.www.hotjava,at.tuwien.lva.se-java,aus.computers.java Subject: Re: Run external application from Java Date: Tue, 29 Apr 2003 11:25:57 +0800 Organization: The University of Western Australia Lines: 17 Message-ID: <b8krcd$cgr$1@enyo.uwa.edu.au> References: <8jara.73691$iy5.2239006@twister2.libero.it> Reply-To: jkingkard@SPAM.hotmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: enyo.uwa.edu.au 1051586765 12827 130.95.116.81 (29 Apr 2003 03:26:05 GMT) X-Complaints-To: usenet@news.uwa.edu.au User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030317 X-Accept-Language: en-us, en In-Reply-To: <8jara.73691$iy5.2239006@twister2.libero.it>