A follow-up question
I have a jar file that looks like this from contents stand point
c:> jar vtf csdsutility.jar
0 Mon Oct 24 10:04:58 EDT 2005 META-INF/
71 Mon Oct 24 10:04:58 EDT 2005 META-INF/MANIFEST.MF
2633 Fri Oct 21 17:04:44 EDT 2005 csds/utility/JavaLogging.class
1621 Fri Oct 21 17:04:42 EDT 2005 csds/utility/Logging.class
868 Fri Oct 21 17:04:42 EDT 2005 csds/utility/LoggingMethod.class
3204 Fri Oct 21 17:04:44 EDT 2005 csds/utility/TestLogging.class
3004 Fri Oct 21 17:04:44 EDT 2005 csds/utility/Utility.class
1142 Fri Oct 21 17:04:44 EDT 2005 csds/utility/WSLogging.class
83 Tue Jul 26 21:59:26 EDT 2005 csds/utility/javalogging.properties
If I include the jar file above in some other program it should find the
javalogging.properties file correct? It's failing in the common code
trying to find the properties file. I created a small driver that tests
the common code and it is fine it just does not work off the jar file.
Is there something weird about jar files and property files I don't know
about? I thought when you included them on the java -classpath line it
was like that code was part of your application and the path followed also.
Thanks,
Frank
> I was wondering is there any issues with having a common package have
> it's property file also contained in it's jar file? I'm having a
[quoted text clipped - 6 lines]
>
> Frank
Roedy Green - 25 Oct 2005 05:07 GMT
>If I include the jar file above in some other program it should find the
>javalogging.properties file correct?
see http://mindprod.com/jgloss/images.html
for code samples how to use getResource and getResourceAsStream.
So yes, if they did the right code.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
>I was wondering is there any issues with having a common package have
>it's property file also contained in it's jar file?
Some problems, which are far from insurmountable, are:
1. making sure you name it properly with the package, case sensitive,
as the path name.
2. making sure you remember to include it in the jar, and that any
client of your class remember to include it in their jars. that
include your class. It won't be included automatically, even by
Genjar. See http://mindprod.com/jgloss/cramfull.html
for a way around that.
3. if you only sometimes need it, it will be downloaded anyway. If
only sometimes need it, put the resource in an aux jar with the
manifest in them main jar class-path referring to it.
4. If you change the properties frequently, you have to keep
rebuilding and resigning the jar. Further, all those changes screw up
any jar caching forcing the whole jar to be reloaded over and over.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.