1 |
/* InitialContext.java -- |
/* InitialContext.java -- |
2 |
Copyright (C) 2000 Free Software Foundation, Inc. |
Copyright (C) 2000, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
126 |
} |
} |
127 |
catch (IOException e) {} |
catch (IOException e) {} |
128 |
|
|
129 |
String home = System.getProperty("java.home"); |
String home = System.getProperty("gnu.classpath.home.url"); |
130 |
if (home != null) |
if (home != null) |
131 |
{ |
{ |
132 |
String fileName = home + File.separator |
String url = home + "/lib/jndi.properties"; |
|
+ "lib" + File.separator + "jndi.properties"; |
|
133 |
Properties p = new Properties (); |
Properties p = new Properties (); |
134 |
|
|
135 |
try { |
try |
136 |
InputStream is = new FileInputStream (fileName); |
{ |
137 |
p.load (is); |
InputStream is = new URL(url).openStream(); |
138 |
is.close (); |
p.load (is); |
139 |
} catch (IOException e) {} |
is.close (); |
140 |
|
} |
141 |
|
catch (IOException e) |
142 |
|
{ |
143 |
|
// Ignore. |
144 |
|
} |
145 |
|
|
146 |
merge (myProps, p); |
merge (myProps, p); |
147 |
} |
} |