classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to handle properties file


From: Nicolas Geoffray
Subject: Re: How to handle properties file
Date: Thu, 19 May 2005 20:39:12 +0200

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?

> > Other question : shouldn't the function postInit from
> > vm/reference/gnu/classpath/VMSystemProperties be native? It's my vm that
> > reads the commande line that stands before the name of the class to
> > execute.
> 
> The VM* classes are special to the VM, they may be native but does not has
> to be. E.g. in JikesRVM and JNode nearly all stuff is implemented in Java
> itself. So it depends on your VM.
> 
OK

> 
> Michael

-- 
Nicolas Geoffray <address@hidden>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]