Textures were not found when enabling webstart...

Hi there,
i got an perfectly fine workling wee jogl prg, which loads some textures and comes up with an rotating planet with nice textures. So far so good. Compiling and running works fine, but when i enable webstart and try to start it, out of a sudden, my applet cannot find the texture files. Nothing in the code changed.
What happend?
My Code to load the texture is:
texSphere = TextureIO.newTexture(new File(“planetsurface.jpg”), true);
Do i have to specify certain directories where to load my textures??

Any help would be appreciated!
Thanks,
normen

You have to load your textures as resources via the classpath and not as files. Applets and Webstart apps usually don’t have access to the file system. Copy your textures into a dedicated path in your project (like “resources/textures”) and add the “resources” directory to your projects sources via the project properties. After that use

texSphere = TextureIO.newTexture(.class.getResource("/textures/planetsurface.jpg"), true);

to load the textures. (You might have to fiddle a little to get it right, since I write this from my head)

This way your textures get nicely packaged into your apps main jar and are also available in webstart.