Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
and POOF! You're gone! But look, this tiny ad is still here:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic