To install and configure Simple-JNDI

  1. Download Simple-JNDI version 11.4.1 or later from the osjava Open Source Java components Web site.
  2. Extract all files to the root directory you created for your JDBC resources. See JDBC Resources for details.
  3. Using any text editor, create a jndi.properties file in the subdirectory you created for JDBC properties. See JDBC Resources for details.
  4. Add the following code to the jndi.properties file:
    java.naming.factory.initial=org.osjava.sj.SimpleContextFactory
    org.osjava.sj.root=jdbcPropDirectory
    Where:

    jdbcPropDirectory is the full path to the subdirectory in which you created this jndi.properties file, using double single slash characters in place of single characters. For example:

    For /home/jdbcrsc/jdbcProps, specify /home/jdbcrsc//jdbcProps.

  5. Save the file and close the editor.
    Note: If you would prefer that your project access the jndi.properties file from a zip archive, compress the file into an archive with a .zip file extension, and save it to the same directory.