| Author |
Accessing resources outside of the Jar
|
ahmet akin
Greenhorn
Joined: Oct 27, 2003
Posts: 14
|
|
Hello, i package my stand alone application as a jar file. But while distributing it, i will provide some resource files outside of the jar file. (like index files directory for Lucene, some xml configuration files that can be changed runtime ) What is the way of accessing outside resources from a jar file? Lets say i have this structure /myApp /config /indexes /lib /MyApp.jar /Other jars that i use inside the code, normally i access the resources with this.getClass.getResource(<relative path> ; or this.getClass.getResource(<relative path> .getPath(); But when i pack it with jar, how will i lets say access to /config directory? when i stated the app from myApp/lib/MyApp.jar ? is there a resource finder, that i can use for accessing like "../config" within the code?
|
 |
ahmet akin
Greenhorn
Joined: Oct 27, 2003
Posts: 14
|
|
Sorry i needed to format the directory structure:
|
 |
 |
|
|
subject: Accessing resources outside of the Jar
|
|
|