I am trying to play an mp3 file using a neat library I just discovered (JLayer) and it works fine when compiled (in Netbeans) with this code:
ClassLoader cl = this.getClass().getClassLoader();
url = cl.getResource("music/45.mp3");
pin = new FileInputStream(url.getFile());
p = new Player(pin);
p.play();
I built my project and attempted to run the executable jar. I extended JFrame so I could visually see that my program was running. The Frame appears when executed, but no sound. I though that using a class loader would fix this issue, but no luck. Help would be greatly appreciated!