/[classpath]/classpath/javax/naming/InitialContext.java
ViewVC logotype

Diff of /classpath/javax/naming/InitialContext.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mark, Sat Nov 23 21:44:28 2002 UTC revision 1.2 by tromey, Tue Dec 31 19:26:42 2002 UTC
# Line 1  Line 1 
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    
# Line 126  public class InitialContext implements C Line 126  public class InitialContext implements C
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          }          }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26