K
kem1
hi,
i have my.jar with the following structure:
my.jar
|
com
-my.properties
i.e. the properties file is on the top level in the jar. how can
access and load it from com.MyClass. When I run the com.myclass from
within the Eclispse IDE, all is fine. There, the resource file is on
on the same level as the com package (top level) and I access it with
../my.properties. Any help how to make it work from the console - I
have a small run.sh file that needs to to look something like
java -classpath "external.jar:my.jar" com.myClass
It says FileNotFoundException when I try ./my.properties or just
my.properties. I realise that executor is looking for the files on the
file system, not within the jar.
Thanks,
k
i have my.jar with the following structure:
my.jar
|
com
-my.properties
i.e. the properties file is on the top level in the jar. how can
access and load it from com.MyClass. When I run the com.myclass from
within the Eclispse IDE, all is fine. There, the resource file is on
on the same level as the com package (top level) and I access it with
../my.properties. Any help how to make it work from the console - I
have a small run.sh file that needs to to look something like
java -classpath "external.jar:my.jar" com.myClass
It says FileNotFoundException when I try ./my.properties or just
my.properties. I realise that executor is looking for the files on the
file system, not within the jar.
Thanks,
k