Resource not found.

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Resource not found.

gouessej
Administrator
Ok but if you put your images into a directory "images/" at the root of your JAR it should work.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Resource not found.

Pixelapp
After I put the images folder at the root I tried:

this.getClass().getClassLoader("images/");

Wavelogy.class.getResourceAsStream("/images/")

They work on Windows but they don't work on Ubuntu 12.1.

One more thing. Let me be clear. This is the correct way to load resources from a Web Start Jar according to Oracle' tutorials: this.getClass().getClassLoader("images/");, other ways of achieving this are just hacks.

12