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
This commit is contained in:
parent
3d1252a94a
commit
9f17a7afd2
4 changed files with 61 additions and 27 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue