users@glassfish.java.net

where to put properties file

From: <glassfish_at_javadesktop.org>
Date: Mon, 05 Oct 2009 05:14:26 PDT

In the prototype system that I am setting up, I need to implement several web services, with different describing names, but otherwise the same java code. For performance reasons I don't want to have the full development environment on all the connected computers, but only install what is needed on some of them, and execute the services from war and jar files (if possible). The service has also a local GUI client.
For storing the service-dependent (= personal, org.unit, etc.) parameters, I thought that I could use property files, so that I wouldn't need to hard-code all the parameters, image paths, etc. But here I run into a problem: [b]in which folder shall I put the properties file[/b], so that it's accessible both to the web service and the GUI? How with other files that the program needs, like images, in which directory does java look for for them? I have sometimes used resourceBundles, which I think is quite similar to properties, but that was either with Tomcat or plain Java programs and many years ago, so don't remember where I put them. I use mostly Windows (Vista or XP), but I wish that this service and GUI should be portable to Linux also.
Tried to put it in the source root from which Netbeans copied it automatically to class root, this does at least not work.

  Jan
[Message sent by forum member 'lussej' (jan.lucenius_at_tkk.fi)]

http://forums.java.net/jive/thread.jspa?messageID=366816