S
stivazzi
hi everybody, i have a problem: i never did applications like this...
i have a jar, let's call it myJar.jar.
inside the jar there are many folders
/lib (with other used jars: jdbc, log4j, etc)
/config, (reads some db connections params and other ones)
/config/xml, (writes an xml file at runtime, and also dtd to validate
it against with are there)
/logs (writes logs, obviously )
i read property file with
Properties p = new Properties();
p.load(classObject.getResourceAsStream("/config/config.properties"));
from eclipse works as a bijoux.
if i extract the jar.. if i have no folder named config at the same
level as the jar, nothing works!
i would like to read the file in the jar itself... i don't want to
have folders out of the jar
and... the same as for other libs! if i have no folder named lib at
the same level as the jar, nothing works!
the jar is called by a bat file in this way:
java -Xbootclasspath/a:"lib/commons-lang-2.4-bin.zip;lib/
log4j-1.2.8.jar;...." -jar "myJar.jar" AAA
Thanks
Andrea
i have a jar, let's call it myJar.jar.
inside the jar there are many folders
/lib (with other used jars: jdbc, log4j, etc)
/config, (reads some db connections params and other ones)
/config/xml, (writes an xml file at runtime, and also dtd to validate
it against with are there)
/logs (writes logs, obviously )
i read property file with
Properties p = new Properties();
p.load(classObject.getResourceAsStream("/config/config.properties"));
from eclipse works as a bijoux.
if i extract the jar.. if i have no folder named config at the same
level as the jar, nothing works!
i would like to read the file in the jar itself... i don't want to
have folders out of the jar
and... the same as for other libs! if i have no folder named lib at
the same level as the jar, nothing works!
the jar is called by a bat file in this way:
java -Xbootclasspath/a:"lib/commons-lang-2.4-bin.zip;lib/
log4j-1.2.8.jar;...." -jar "myJar.jar" AAA
Thanks
Andrea