Please send feedback to jndi@java.sun.com
Table of Contents
This document describes how to use the JNDI 1.2 Optional Package with the
Java 2 SDK, Standard Edition, v 1.2.x,
and the JDK 1.1.x.
See the JNDI Tutorial
for detailed descriptions and examples.
If you are using JNDI as an installed extension, that is, jndi.jar
has been installed in the $JAVA_HOME/jre/lib/ext directory,
you need to take no further action.
Otherwise, you must grant the following permissions to jndi.jar:
In addition, you must grant the following permission jndi.jar
if the application/applet code is loaded using a different classloader
than the one that loaded jndi.jar. If the application/applet
code is in the same classpath as jndi.jar, then you do
not need to do this.
Introduction
Java 2 SDK, Standard Edition, v 1.2.x
Software Dependencies
Software Installation
Security Considerations
When a Reference is read from the naming or directory service
and a codebase specifying where to load the factory class for the
reference has been specified, JNDI will attempt to load the class from the
locations specified in code base. In order for the class loading to succeed,
you must grant the application the permissions appropriate for the
URLs named in the codebase. For example, if the URL scheme is "http" or "ftp",
you must grant the application the appropriate
java.net.SocketPermission; if the URL scheme is "file", you
must grant the application the appropriate
java.io.FilePermission.
permission java.util.PropertyPermission "java.naming.factory.initial", "read";
permission java.util.PropertyPermission "java.naming.factory.object", "read";
permission java.util.PropertyPermission "java.naming.factory.url.pkgs", "read";
permission java.util.PropertyPermission "java.naming.factory.state", "read";
permission java.util.PropertyPermission "java.naming.factory.control", "read";
permission java.util.PropertyPermission "java.naming.provider.url", "read";
permission java.util.PropertyPermission "java.naming.dns.url", "read";
permission java.io.FilePermission "${jndi.home}${/}lib${/}*", "read";
You must also grant the permissions required for class loading
described above to jndi.jar.
permission java.lang.RuntimePermission "getClassLoader";
JDK 1.1.x
Software Dependencies
Software Installation
Security Considerations
When a Reference is read from the naming or directory service
and a codebase specifying where to load the factory class for the
reference has been specified, JNDI will attempt to load the class
using the RMIClassLoader. In order for the class loading
to succeed, the application must have installed
a security manager.
For example, you can install the RMISecurityManager as follows:
System.setSecurityManager(new java.rmi.RMISecurityManager());
Copyright © 1999 Sun Microsystems, Inc., All Rights Reserved.