I'm trying to develop a java application for the raspberry pi that will play mp3s.
I wrote a simple program to see if it would work using JLayer
Code for the app is like this:
public static void main(String[] args) {
Player player = null;
try {
FileInputStream fis = new FileInputStream("song.mp3");
BufferedInputStream bis = new BufferedInputStream(fis);
player = new Player(bis);
} catch (Exception e) {
System.out.println(e.getMessage());
}
try {
player.play();
} catch (JavaLayerException e) {
System.out.println(e.getMessage());
}
}
The program runs on windows but on the pi when creating the new player object I am getting the exception:
Cannot create AudioDevice
Has anyone been able to get JLayer working on the pi?
I'm using the latest Soft-float Debian “wheezy” image with the Orcale JVM.