• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Play MP3 in jar file

 
Fintan Conway
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an application that plays an MP3 song.

I have package the app into a jar, and included the MP3 song in the jar.

I would like the jarred app to pick up the MP3 song from the jar and play it from there, rather than having to include the MP3 file separately with the application. Is this possible?

I have found lots of ways to play "sampled audio" songs (wav, etc.) like this, but I cannot get it to work with an MP3 file.

I have also tried the following using the Java Media Framework (JMF), i.e. javax.media.* packages.


Any help would be greatly appreciated
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried the JMF MP3 plugin?
 
Fintan Conway
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouter Oet wrote:Have you tried the JMF MP3 plugin?

Hi Wouter,

I have downloaded this and installed it. However I cannot find any documentation on how to use it within my code. Do you have any links/suggestions on how to code using this mp3plugin.jar?

Many thanks
 
John de Michele
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fintan:

Have you googled 'JMF javadoc'? I found information right away.

John.
 
Rob Spoor
Sheriff
Pie
Posts: 20559
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used BasicPlayer in a little demo console MP3 player application once. JLayer is also an often advised library.
 
Fintan Conway
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John de Michele wrote:Fintan:

Have you googled 'JMF javadoc'? I found information right away.

John.

Hi John,

I have tried this. Unfortunately there is no information on how to programmatically play an MP3 file, using either JMF or the MP3 plugin. I could find no javadocs for the mp3 plugin.

Could you post links to where you found sample code / javadocs for coding to play MP3 files please?

Many thanks,

Fintan
 
Rob Spoor
Sheriff
Pie
Posts: 20559
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for completely ignoring my post.
 
Bert Wilkinson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Thank you so much for completely ignoring my post.


Lighten up.... He's trying the first idea presented.
 
Rob Spoor
Sheriff
Pie
Posts: 20559
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if that doesn't work you don't try the next suggestion? I certainly would.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic