T
Tom Forsmo
Hi
I keep having problems with file paths in java. Every time I have to
make a file available, mostly a config file of some sort, to the
application I keep having problems specifying the correct path to the
file. There seems to be many different syntaxes for doing this and I
dont understand fully which do what and how.
I have tried to find some information about this on the net, but have
not been able to find something that fully explains this.
Here are some specific examples of paths issues I have.
log4j
spring
java properties files
The question is: where do I put the config file and how do I specify the
path to where the config file is to be found? I have noticed that some
use the "classpath:" to specify a config file that is to be found
somewhere in the classpaths, I have also noticed that some require the
config file to be in the same directory as the class resides in.
I have not figured out how to specify a path to a file outside the
classpath dorectoru paths, eg. in a separate conf/ directory.
Some help or guidance is much appreciacted, thanks
tom
I keep having problems with file paths in java. Every time I have to
make a file available, mostly a config file of some sort, to the
application I keep having problems specifying the correct path to the
file. There seems to be many different syntaxes for doing this and I
dont understand fully which do what and how.
I have tried to find some information about this on the net, but have
not been able to find something that fully explains this.
Here are some specific examples of paths issues I have.
log4j
spring
java properties files
The question is: where do I put the config file and how do I specify the
path to where the config file is to be found? I have noticed that some
use the "classpath:" to specify a config file that is to be found
somewhere in the classpaths, I have also noticed that some require the
config file to be in the same directory as the class resides in.
I have not figured out how to specify a path to a file outside the
classpath dorectoru paths, eg. in a separate conf/ directory.
Some help or guidance is much appreciacted, thanks
tom