I used the example as follows:
InputStream is =
getClass().getResourceAsStream("moo.wav");
try {
Player p =Manager.createPlayer(is, "audio/x-wav");
p.prefetch();
p.start();
}
catch (Exception e){
System.out.println("aäänitulostevirhe");
e.printStackTrace();
}
file moo.wav is in the Jar file for the project.
is remains null and no sound comes
Playsound works
What is wrong?

Reply With Quote

