• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic