Java音频播放,只播放本地音乐

package com.rjxy.Music1_1;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;

public class Music1 implements Runnable{

String path = "D:/java/青柠.wav";
File file = null;
BufferedInputStream is = null;

//mian()方法
public static void main(String args[]) {
Music1 music = new Music1();
Thread thread = new Thread(music);
thread.start();
}
//重写run()
public void run() {
try {
file = new File(path);
is = new BufferedInputStream(new FileInputStream(file));
System.out.println(file.getName()+" 加载成功!");
} catch (FileNotFoundException e) {
System.out.println(file.getName()+" 加载失败!");
e.printStackTrace();
}
try {
new Player(is);
System.out.println("palyer创建成功!");
} catch (JavaLayerException e) {
System.out.println("player创建失败!");
e.printStackTrace();
}
try {
Thread.sleep(64000);
System.out.println("Thread休眠!");
} catch (InterruptedException e) {
System.out.println("Thread休眠失败!");
e.printStackTrace();
}
}

}
为什么编译运行都不报错,但是为什么没有声音?
求大佬帮忙

放在主线程里试试看。可能是你主线程结束了,于是程序中止了,而子线程没有来得及执行。

我觉得是虽然player创建成功,但是后面要求当前线程线程睡眠,你要不试试先把睡眠注释试一下