Article View: borland.public.jbuilder.java.language
Article #7483Re: Locating an INI file
From: Mio Nino Marquez
Date: Thu, 21 Jun 2001 06:19
Date: Thu, 21 Jun 2001 06:19
21 lines
1820 bytes
1820 bytes
"Torsten Welches" <torsten.welches@who.cares.netcologne.de> wrote in message
news:3b318ce2$1_2@dnews...
> Java has no consistent notion about an "application path", but
> System.getProperty("user.dir"); returns the user directory. You
> could store your files there. You could also set an application property
with a -D VM parameter. And finally you could get your
> file using the main class' classloader with something like
> mainClassInstance.class.getResourceAsStream("foo.ini");
>
> BTW - ini files are a Windows-only concept, the Java equivalent
> are property files:
> http://java.sun.com/docs/books/tutorial/essential/attributes/index.html
>
To be honest, it isn't an INI file actually, but a file ending with
properties. I've dabbled with PropertyResourceBundle etc. but I couldn't
seem to get it to work. <g>
Thanks for your response. I'll try the user.dir stuff. :)
Mio Nino Marquez
Technical Details
Message-ID:
<3b319123_2@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!dnewsReferences:
<3b317205_1@dnews> <3b318ce2$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,52be12fbe909d3e9 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-20 23:39:05 PST From: "Mio Nino Marquez" <mionino[nospam]@apsilontech.com> Newsgroups: borland.public.jbuilder.java.language References: <3b317205_1@dnews> <3b318ce2$1_2@dnews> Subject: Re: Locating an INI file Date: Thu, 21 Jun 2001 14:19:13 +0800 Lines: 24 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: <3b319123_2@dnews> X-Trace: dnews 993104163 165.21.114.96 (20 Jun 2001 23:16:03 -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