java directory?# Java - 爪哇娇娃
c*t
1 楼
How to find the jar directory my jar file is running from?
For example, my abc.jar could be run by somebody by
java -jar /some/where/abc.jar
or they could run like
java -cp /some/where/abc.jar Main
However, i needed to create/load preferences in the same directory
where abc.jar is located.
Anyone could show me howto?
Thanks a lot
For example, my abc.jar could be run by somebody by
java -jar /some/where/abc.jar
or they could run like
java -cp /some/where/abc.jar Main
However, i needed to create/load preferences in the same directory
where abc.jar is located.
Anyone could show me howto?
Thanks a lot