i usually use this method for loading image from jar to my components. i also
test it for .xml .txt .doc .wav .mp3 .class and it works well. you can change type of parent to Object.
i had problem with getResourceAsStream in one of my project and then i use URLClassLoader.