I just downloaded JMF from this site:
http://java.sun.com/produ...dia/jmf/mp3/download.html /
http://java.sun.com/produ...a/jmf/2.1.1/download.html but when i run this line: java com.sun.media.codec.audio.mp3.JavaDecoder to complete the install as instructed I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/codec
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
I know it's a classpath problem but i'm not sure where to look.. the setup should install the files in: C:\Program Files\Java\jre1.6.0_01\lib\ext where "jre1.6.0_01" is the java version. It did installed the plugin file in the EXT directory but when i want to test the plugin with code from the sun forum (
http://forum.java.sun.com...352&messageID=3565801 ):
GeSHi (java):
import javax.media.*;
import java.io.*;
public class PlayMP3Thread
{
public PlayMP3Thread
(File mp3
) {
this.url = mp3.toURL();
}
public void run()
{
try
{
MediaLocator ml = new MediaLocator(url);
Player player = Manager.createPlayer(ml);
player.addControllerListener(
new ControllerListener()
{
public void controllerUpdate(ControllerEvent event)
{
if (event instanceof EndOfMediaEvent)
{
player.stop();
player.close();
}
}
}
);
player.realize();
player.start();
}
{
e.printStackTrace();
}
}
}
Created by GeSHI 1.0.7.20
the library cannot be found. Any suggestions?