I am trying to get the mp3 play button for working with JLayer. I do not get errors, but the sound does not play. I added all the necessary jar files to the library and followed many tutorials, so the code should work, but I just don't get any sound. (P / S: I don't have an mp3 plugin)
try
{
JOptionPane.showMessageDialog(null,"Trying");
FIS = new FileInputStream("C:\\Users\\Jun\\Documents\\NetBeansProjects\\Player\\src\\Songs\\NumaNuma.mp3");
BIS = new BufferedInputStream(FIS);
playSong = new javazoom.jl.player.Player(BIS);
playSong.play();
}
catch(FileNotFoundException | JavaLayerException e)
{
JOptionPane.showMessageDialog(null,"Error Occured " + e);
}
new Thread()
{
@Override
public void run()
{
try
{
playSong.play();
}
catch (JavaLayerException ex) {
JOptionPane.showMessageDialog(null,"Error Occured " + ex);
}
}
}.start();
source
share