0 Replies Latest reply on Feb 17, 2002 8:14 AM by Nikolaj G.

    reading jndi.properties from code

    Nikolaj G. Newbie

      Hi,

      A simple question - how do I get the hostname from the "jndi.properties" file in my code (bean). I have tried this:

      Hashtable props = System.getProperties();
      Object obj = props.get(Context.PROVIDER_URL);
      obj.toString();

      The above doesn't work (can't remember the error)

      /nikolaj

      PS setting the properties works:
      props.put(Context.PROVIDER_URL, "localhost:1099");