EasyOGG doesn't work in Jar?

Anyone know how to make easyOGG work inside a jar file? It works outside just fine, but once inside it doesn’t play any music at all.

what do yo mean “inside”

once I put the easyOGG jar and the other ones inside mygame.jar it doesn’t read the music.ogg file inside the jar, or outside it.

use getClass().getClassLoader().getResourceAsStream(“song.ogg”)

try{
OggClip clip = new OggClip(getClass().getClassLoader().getResourceAsStream(“mymusic.ogg”));
clip.loop();
}

  catch(Exception e)
  {
  	e.printStackTrace();
  }

same problem. This could be a big problem if easyOGG doesn’t work in jars…

You should not put jars inside jars. Keep the files separate or create one jar containing the files of both jars. Also, instead of “song.ogg” try “/song.ogg”. It will make it search threw all the classloaders. (I think)

You can’t load more than one jar with jnlp. Also using “/mysong.ogg” messes it up worse, as it wouldn’t even run outside the jar, nor inside.

You can use as many jars as you want with jnlp. Just add them under the resources tag.

That fixed both problems. Thanks!