classpath
[Top][All Lists]
Advanced

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

Re: Finding .security files


From: Mark Wielaard
Subject: Re: Finding .security files
Date: 17 Nov 2002 18:40:02 +0100

Hi,

On Thu, 2002-11-14 at 21:19, Tom Tromey wrote:
> Today I fixed a buglet in libgcj relating to finding the .security
> files.
> 
> The current code looks like this:
> 
>     loadProviders(System.getProperty("java.home"),
>                 System.getProperty("java.vm.name"));
>     loadProviders(System.getProperty("gnu.classpath.home"), "classpath");
> 
> Now, we define java.vm.name as "GNU libgcj", which we'd really rather
> not use as a directory name (and which we'd rather not change).  So
> one idea I had here was to change this code to remove everything up to
> and including the first space.  This is sort of ugly, but will get us
> what we want.

We do want to have a short (no spaces) name for the refering to the VM
we run inside. Not only for finding properties files like java.security,
logging.properties, font.properties, etc. that might or might not be
overridden by the actual VM. But also for package names to refer to
class handlers. For example when we merge the URL handlers it would be
nice to define the normal handlers that Classpath defines and that all
VMs will want to include like gnu.java.net.file.Hanlder. But VMs might
want to add specific handlers like the "core" handler that gcj has. We
could then add the package gnu.java.net.${short_vm_name}.content to the
packages that are searched for content handlers.

So I propose we introduce a new System property "gnu.classpath.vm.name"
that should be set to the short name of the VM that the Classpath
libraries run inside and that can be used for purposes like the above.
(Or just demand that java.vm.name is set to the short VM name.)

> Also, for some installs of libgcj it would be more appropriate not to
> look for a file at all.  For instance an embedded system may not have
> a filesystem.  One thought here was to have a way to provide Classpath
> with a base URL to which the appropriate names could be added.  Then
> for embedded systems we could use a libgcj-style "core:/" URL to find
> the security providers.

Nice idea. I like it. So we would have a System property say
"gnu.classpath.vm.base.url" that points to the 'VM home' from which to
load things like property files. Normally that would simple be something
like file:///${java.home}/ but for gcj on embedded devices it could be
the "core:/" URL. Nice.

Volunteers for documenting and implementing this idea?

Cheers,

Mark





reply via email to

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