熟悉jmf的大侠请留步
用jmf里面的类播放一个指定MP3文件比如音乐文件的本地地址是E:\\abc.mp3,然后把音乐播放出来,代码越少越好 --------------------编程问答-------------------- 先安装mp3插件。import java.io.File;--------------------编程问答-------------------- Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/MediaLocator
import javax.media.*; // Manager,MediaLocator,Player,
File file = new File("E:\\abc.mp3");
MediaLocator locator = new MediaLocator(file.toURI().toURL());
Player player = Manager.createPlayer(locator);
player.start();
at music.Test.main(Test.java:60)
Caused by: java.lang.ClassNotFoundException: javax.media.MediaLocator
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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
Java Result: 1
运行后报错,还有怎么网上有人说不装插件也行, --------------------编程问答-------------------- customizer.jar (not used ???)
mediaplayer.jar
jmf.properties
mp3plugin.jar
multiplayer.jar
jmf.jar
--------------------编程问答-------------------- customizer.jar
mediaplayer.jar
multiplayer.jar
jmf.jar
这几个包有了,而且我是直接放在E:\java\jre\lib\ext目录下的,我把jdk装在E:\java --------------------编程问答-------------------- 没人来了吗 --------------------编程问答-------------------- 使用 http://www.javazoom.net/javalayer/javalayer.html 播放mp3。jmf好多年没更新过。
MP3: Play MP3s from Java with Javazoom --------------------编程问答-------------------- 那如果编一个像千千静听那样的播放器用什么包好呢?
补充:Java , Java相关