PDA

View Full Version : What are resouce files?



StOoZ
August 23rd, 2008, 01:25 PM
I see in netbeans , in my project tree , a node with the name "Resource Files" , so what are they?

10x

mike_g
August 23rd, 2008, 02:11 PM
I'm not sure about this, but I think they hold stuff like the icons for executables on Windows.

Edit: http://angusj.com/resourcehacker/

aloshbennett
August 23rd, 2008, 04:17 PM
Resources contain any image, and other media files you application might be needing. Instead of refering to an image by the path, if you add it to the resources folder you can access it by APIs like getResource().

Finally, when you build your application, the resources are included into the jar and all you need to do is ship a single jar file.

StOoZ
August 23rd, 2008, 04:20 PM
sound interesting , do you know of a good tutorial about that ??? (found one on MSDN , but its not that good)

aloshbennett
August 23rd, 2008, 05:07 PM
Its spread all over the place. You could find something about creating jar files and how to include images in them.

To retrieve them, you can look at the Class.getResource() method.