我按下按钮时试图发出声音。我收到了这个错误:
无法从输入文件中获取音频输入流
private void spinButtonActionPerformed(java.awt.event.ActionEvent evt) {
try {
String roulettespin = "roulettespin.wav";
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(roulettespin).getAbsoluteFile());
Clip clip = AudioSystem.getClip();
clip.open(audioInputStream);
clip.start();
} catch (Exception e) {
System.err.println(e.getMessage());
}
}