File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Java mp3 player Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java mp3 player" Watch "Java mp3 player" New topic
Author

Java mp3 player

Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
I tried implementing an mp3 player that someone released into a game client of mine, The player works fine on my own computer but when I distribute the client the player doesn't work properly. I get this error:



The mp3 player I used is located here, Source files included:

http://www.codetoad.com/java_mp3_player.asp

If someone could help me It would be greatly appreciated

Thanks for your time,

Austin
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
How are you distributing it? Are all required libraries included and properly referenced?
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:How are you distributing it? Are all required libraries included and properly referenced?


It's being distributed in a rar file, which has the bin directory in it, it contains the batch files with the correct run command in it. All class files are in and my client loads fine, the mp3 shows when activated but when you attempt to play a song it throws the error.

The jmf.jar library is in the bin folder and the run batch file references it.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
In addition to JMF, does it also contain and reference the MP3 plugin for JMF?
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:In addition to JMF, does it also contain and reference the MP3 plugin for JMF?


No, how would I reference that? Do I need to? I haven't referenced it on my own computer and it works properly.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
By "referencing it" I mean "adding it to the classpath". On your computer you may have it in a directory where it's added to the classpath automatically, but that wouldn't be the case on some other random machine. Since you mention a batch file, I assume that contains a "java" command - its "-cp" switch determines the classpath, and that must contains all classes and jar files.
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:By "referencing it" I mean "adding it to the classpath". On your computer you may have it in a directory where it's added to the classpath automatically, but that wouldn't be the case on some other random machine. Since you mention a batch file, I assume that contains a "java" command - its "-cp" switch determines the classpath, and that must contains all classes and jar files.


I know what you meant by referencing, I don't know which file I have to reference though, I've already referenced the jmf, Is there something else I need to reference? If so do you have a download for the jar?

Here is my current batch file:



Thanks for your assistance.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I don't know what "Theme.jar" contains. I do know that the MP3 plugin for JMF is a separate jar file from JMF itself.
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:I don't know what "Theme.jar" contains. I do know that the MP3 plugin for JMF is a separate jar file from JMF itself.


The theme.jar is separate from the mp3, its a set of different themes I use for my client. But the mp3 plugin ill have to find, that may be what I am missing, thanks for this and I'll let you know if i fine it and whether or not it works.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
http://www.oracle.com/technetwork/java/javase/download-137625.html
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:http://www.oracle.com/technetwork/java/javase/download-137625.html


That download button takes me to this page:



Where the plugin isn't on the list......
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
That's odd. I get a page titled "JMF MP3 Plugin" which is about nothing but downloading the plugin.
Austin Melchior
Greenhorn

Joined: May 05, 2012
Posts: 7
Tim Moores wrote:That's odd. I get a page titled "JMF MP3 Plugin" which is about nothing but downloading the plugin.


When I click the link I get this:



That download button though takes me to the page in my last post and that doesn't have the mp3 download on it :\

I found one, for anyone who needs it here it is:

http://pscode.org/lib/mp3plugin.jar
 
Consider Paul's rocket mass heater.
 
subject: Java mp3 player