To get the resource, you need to be using the relative package structure, not the project structure on the disk.
Code:
public void play()
{
if (m_player != null){
stop();
}
try {
Class cl = Class.forName("com.foo.Foobar.Foobar");
InputStream input = cl.getResourceAsStream("/foonoise.mp3");
m_player = Manager.createPlayer(input,"audio/mpeg");
m_player.realize();
m_volumeControl = getVolumeControl(m_player);
if (m_volumeControl != null)
m_volumeControl.setLevel(m_volume);
m_player.prefetch();
m_player.start();
}
catch (Exception e){
System.out.println("ERR: " + e.toString());
}
}