A
Adam
Hi
I am just getting to grips with Java and am having some problems with
distributing my applications.
I have the application packaged as a jar file, this jar file uses a download
extension to reference another jar file (DB drivers). There is also a
properties file the the application relies on. This is an application wide
properties file (not user specific) so I don't want it in the users home
directory. I cannot find a reliable way of determining where this file is
from within the Java code. The File(path) constructor looks in the users
home dir and then the current directory. If someone executes the jar file
using java -jar D:\AppPath\App.jar I cannot specify a relative reference
path within the code that will reliably find this file.
This must be a common problem and there is probably a simple method for
solving this.
Can anyone help?
Thanks
Adam
I am just getting to grips with Java and am having some problems with
distributing my applications.
I have the application packaged as a jar file, this jar file uses a download
extension to reference another jar file (DB drivers). There is also a
properties file the the application relies on. This is an application wide
properties file (not user specific) so I don't want it in the users home
directory. I cannot find a reliable way of determining where this file is
from within the Java code. The File(path) constructor looks in the users
home dir and then the current directory. If someone executes the jar file
using java -jar D:\AppPath\App.jar I cannot specify a relative reference
path within the code that will reliably find this file.
This must be a common problem and there is probably a simple method for
solving this.
Can anyone help?
Thanks
Adam