File file=new File("C:\Users\me\Desktop\a.flac");
audioInputStream = AudioSystem.getAudioInputStream(file);
audioFormat = audioInputStream.getFormat();
然后运行就显示
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file
我添加了jflac-1.3.jar包还有jfac-1.3-jdk1.4.jar包,还是显示文件格式不支持,郁闷。其他格式的都能够播放。