diff options
author | Tom Tromey <tromey@redhat.com> | 2002-12-31 22:50:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-12-31 22:50:10 +0000 |
commit | 9f17a7afd2a4fa6175e8ab1551701f38951876eb (patch) | |
tree | 5bd605f06794bcbdcaf0af79cbd1c90f58918ffa /libjava/javax/naming/InitialContext.java | |
parent | 3d1252a94a9780741c28e3b872577925b919ca0f (diff) | |
download | gcc-9f17a7afd2a4fa6175e8ab1551701f38951876eb.zip gcc-9f17a7afd2a4fa6175e8ab1551701f38951876eb.tar.gz gcc-9f17a7afd2a4fa6175e8ab1551701f38951876eb.tar.bz2 |
re PR libgcj/7416 (java.security startup refs "GNU libgcj.security")
Fix for PR libgcj/7416:
* javax/naming/InitialContext.java (init): Use
gnu.classpath.home.url.
* java/security/Security.java: Use new properties.
(loadProviders): Accept base url; use it.
* java/lang/System.java: Document gnu.classpath.vm.shortname, and
gnu.classpath.home.url.
(gnu.classpath.home.url): Define.
(gnu.classpath.vm.shortname): Likewise.
From-SVN: r60722
Diffstat (limited to 'libjava/javax/naming/InitialContext.java')
-rw-r--r-- | libjava/javax/naming/InitialContext.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libjava/javax/naming/InitialContext.java b/libjava/javax/naming/InitialContext.java index 99ae426..705e24a 100644 --- a/libjava/javax/naming/InitialContext.java +++ b/libjava/javax/naming/InitialContext.java @@ -1,5 +1,5 @@ /* InitialContext.java -- - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -126,18 +126,22 @@ public class InitialContext implements Context } catch (IOException e) {} - String home = System.getProperty("java.home"); + String home = System.getProperty("gnu.classpath.home.url"); if (home != null) { - String fileName = home + File.separator - + "lib" + File.separator + "jndi.properties"; + String url = home + "/jndi.properties"; Properties p = new Properties (); - try { - InputStream is = new FileInputStream (fileName); - p.load (is); - is.close (); - } catch (IOException e) {} + try + { + InputStream is = new URL(url).openStream(); + p.load (is); + is.close (); + } + catch (IOException e) + { + // Ignore. + } merge (myProps, p); } |