支持播放列表 于是用java写了个自动生成播放列表 很简单 不过第一次在linux写了个对自己有用的程序 高兴 哈哈 mport java.io.*;
public class PlayList {
public PlayList() throws Exception{
BufferedWriter bw=new BufferedWriter(new FileWriter("/root/hh.txt")); //播放列表的位置
File dir=new File("/mnt/hgfs/music/");//歌曲目录
File[] file=dir.listFiles(new FilenameFilter(){
public boolean accept(File dir, String name) {
// TODO Auto-generated method stub
if(name.endsWith("wma") || name.endsWith("mp3")) //格式支持
return true;
return false;
}
});
for(int i=0;i
bw.newLine();
}
bw.close();
}
public static void main(String args[]) {
try {
new PlayList();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}


qquchn 于 2007-10-04 18:50:16发表:
为啥你的文档要存在/root?
不能到~么? 这样通用性更好
奶茶dsk 于 2007-10-04 12:08:24发表:
对java期待。。。。。:0L