🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7477

Locating an INI file

#7477
From: Mio Nino Marquez
Date: Thu, 21 Jun 2001 04:06
15 lines
1418 bytes
Java newbie here. :)

I've written a bunch of class under a package (say MyLib). One class needs
to read an INI file for some configuration settings. Initially, I have hard
coded the location of the file. But now, I don't want it to be hard coded.

So I guess my question is, how do I know the location of the class /
package? Code snippets would definitely be helpful.

PS: In Delphi I can use the ExtractFilePath(application.exename) to get the
location of the exe file. i'm looking for something similar in java.

Thanks in advance!

Mio Nino Marquez
Technical Details
Message-ID: <3b317205_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,52be12fbe909d3e9,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-20 21:11:11 PST
From: "Mio Nino Marquez" <mionino[nospam]@apsilontech.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Locating an INI file
Date: Thu, 21 Jun 2001 12:06:27 +0800
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 165.21.114.96
Message-ID: <3b317205_1@dnews>
X-Trace: dnews 993096197 165.21.114.96 (20 Jun 2001 21:03:17 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews