Re: Giving an application a window icon in a sensible way
Twisted wrote:
...Are you intending to put
- properties files
- help text
- localization data
- any of many other resources..
..'stitched in' to the code?
If it gets complex enough to involve such, then there will be separate
files for some of those, and I'll have to worry about how to get a user
directory
Try
System.getProperty("user.home");
(then make a subdirectory based on you main's
package name, to contain the resources - so
they don't get wiped by other applications)
...in a system-independent way to put the properties files in,
and how to get the app's directory to look for help and non-English
localizations in.
JWS can handle localisation for you (in the sense
of delivering the correct files for each locale),
finding and using those localised resources would
then most naturally be done using getResource().
Java access to (internal - program specific) files is
heavily based around getResource(), I suspect things
will go a lot quicker for you once you have it working
for you.
Note: I never found a way to use getResource() for
both jar'd and 'loose' resources, but with ant build files
(or anything else with even half Ant's abilities) it
is trivial to stamp out a jar(s) of the current project,
and launch it(/them).
Andrew T.