Article View: borland.public.jbuilder.java.language
Article #267location of jar file
From: Oliver
Date: Fri, 20 Oct 2006 11:14
Date: Fri, 20 Oct 2006 11:14
23 lines
1717 bytes
1717 bytes
Hi, 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 :) regards Oliver
Technical Details
Message-ID:
<4538af7b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.code-werk.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f74b3,f288e71066ccfddf,start X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Oliver" <o.maas@nospam_metrohm.de> Sender: "Oliver" <o.maas@nospam_metrohm.de> Reply-To: "Oliver" <o.maas@nospam_metrohm.de> Subject: location of jar file Newsgroups: borland.public.jbuilder.java.language X-User-Info: 81.90.37.2 NNTP-Posting-Host: 207.105.83.66 Message-ID: <4538af7b$1@newsgroups.borland.com> Date: 20 Oct 2006 04:14:03 -0700 X-Trace: newsgroups.borland.com 1161342843 207.105.83.66 (20 Oct 2006 04:14:03 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.code-werk.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail