[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to handle properties file
From: |
Michael Koch |
Subject: |
Re: How to handle properties file |
Date: |
Thu, 19 May 2005 20:47:32 +0200 |
User-agent: |
mutt-ng 1.5.9-r292i (Debian) |
On Thu, May 19, 2005 at 08:39:12PM +0200, Nicolas Geoffray wrote:
> On Thu, 2005-05-19 at 16:27 +0200, Michael Koch wrote:
> > On Thu, May 19, 2005 at 03:14:44PM +0200, Nicolas Geoffray wrote:
> > > Hello all,
> > >
> > >
> > > I'm a student in a french university and finalizing a jvm
> > > implementation, using the gnu classpath. I'm having a few questions (i
> > > hope it's the right place to ask).
> > >
> > > First question : how can i handle properties file stored in the
> > > glibj.zip. A simple example is the readConfiguration function in
> > > java/util/logging/LogManager class file. It first trys to get a
> > > "java.util.logging.config.file" property which should be a path in the
> > > filesystem. The thing is, it's in the glibj.zip file. There might be a
> > > hack somewhere in the FileInputStream to read from a zip file, but i'm
> > > not aware of it.
> >
> > Use java.lang.Class.getResourceAsStream(String)
> >
>
> I didn't know that function. Powerfull! So then, shouldn't the function
> readConfiguration from LogManager make a call like
>
> LogManager.class.getResourceAsStream("java/util/logging/logging.properties");
>
> to have an InputStream instead of looking for system properties?
Use java.util.Properties.load(InputStream) with it.
Michael
--
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
Join the community at http://planet.classpath.org/
- How to handle properties file, Nicolas Geoffray, 2005/05/19
- Re: How to handle properties file, Sascha Brawer, 2005/05/19
- Re: How to handle properties file, Nicolas Geoffray, 2005/05/19
- Re: How to handle properties file, Michael Koch, 2005/05/20
- Re: How to handle properties file, Nicolas Geoffray, 2005/05/20
- Re: How to handle properties file, Michael Koch, 2005/05/20
- Re: How to handle properties file, Mark Wielaard, 2005/05/23