I would like to run audio file from java and i read many codes in SO but unbale to run my file perhaps! Seems I have mentioned wrong path or using wrong lib . Please assist me what's wrong in below code to run mp3 or VLC .aac format file
public void playSound() {
try {
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("D:/clinic/clinic/mysound.mp3").getAbsoluteFile());
Clip clip = AudioSystem.getClip();
clip.open(audioInputStream);
clip.start();
} catch(Exception ex) {
System.out.println("Error with playing sound.");
ex.printStackTrace();
}
}