Urgent -- How to open video or audio player through a GUI ?
s srikanth
Greenhorn
Joined: Jul 06, 2001
Posts: 14
posted
0
Hi , Is there anyway to open media player or sound player (real player or win amp ) through a java program ? i have no idea about the corresponding API's . Can u tell me how this is possible thr a java program . java program means .. i can say like ... suppose i have one GUI in swing .. if i press one button then the real player or media player should be opened as a part of GUI Frame ( say some JFrame ) and the corresponding video or audio file should be executed from there ..is it possibe ? if anyone have idea then plz help me out .. Code samples are also welcome . Thanx in advance , Srikanth S
Shane Roylance
Ranch Hand
Joined: Aug 29, 2001
Posts: 72
posted
0
This may not help you at all, but you can execute an exterior program with code such as this: Runtime r = Runtime.getRuntime(); try{ Process p = r.exec("<program path>"); } catch (Exception e){ } I don't know how to get it to run in a JFrame, and I am not sure about the API for these applications. It seems to me that you can pass an mp3 file on the command line for winamp.
Michael Szul
Ranch Hand
Joined: Sep 18, 2001
Posts: 57
posted
0
Take a look at the Java Media Framework at http://java.sun.com/products/java-media/jmf/index.html I don't thing it'll launch WinAmp or RealPlayer though. I think this is for creating your own solutions. To launch other programs like that, I recommend following the example of the post before this one.
subject: Urgent -- How to open video or audio player through a GUI ?