File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Urgent -- How to open video or audio player through a GUI ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Urgent -- How to open video or audio player through a GUI ? " Watch "Urgent -- How to open video or audio player through a GUI ? " New topic
Author

Urgent -- How to open video or audio player through a GUI ?

s srikanth
Greenhorn

Joined: Jul 06, 2001
Posts: 14
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
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent -- How to open video or audio player through a GUI ?