Board index » jbuilder » location of jar file
location of jar file
2006-10-20 07:14:03 PM
i have a question concerning the location of the jar file.
In Delphi there is the application object, and the property
ExeName gives the location of the exe. In Java there is no
application object. But i still would like to know where the jar
file is located.
At the moment im using the following approach:
- my installation routine writes an environment variable (content: the path into which the installation writes the jar)
- my program reads this environment variable
This works, but i do not really like this approach.
What i really would appreciate is an information from the class
itself (where it is located) - without any foreign info (such
as environment variable).
At the moment my jar file doesnt know where it is, it needs somebody else to tell him :)