Loading jndi.properties file from specific path

         Context context = null;
         try {
                File configFile = new File(“<provide absolute path to your my.jndi.properties file>“);
                Properties prop = new Properties();
                FileInputStream istream = new FileInputStream(configFile);
                prop.load(istream);
                context = new InitialContext(prop);
            } catch (NamingException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }