简单的MP3播放程序
package test.jmf; import
import
import
import javax.media.Manager; //需要下载JMF
import javax.media.NoPlayerException; //需要下载JMF
import javax.media.Player; //需要下载JMF
public class TestForJMF {
public static void main(String args[]) throws NoPlayerException, MalformedURLException, IOException{
String playPath="D:/ubw.mp3"; //硬盘上的MP3文件
Player player = Manager.createPlayer(new File(playPath).toURI().toURL());
player.prefetch();
player.start();
}
}
JMF 2.1.1e 下载 https://down.bccn.net/download-202.html
JMF API文档 下载 https://down.bccn.net/download-203.html
[ 本帖最后由 lampeter123 于 2010-3-20 15:03 编辑 ]