<HTML>
<HEAD>
<title>
JNDI 1.2 Optional Package
</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT=#000000 LINK=#0000ff VLINK=#000077
ALINK=#ff0000>
<hr SIZE=3 NOSHADE WIDTH="100%">
<center>
<h1>
Java Naming and Directory Interface<font size=4><sup>TM</sup></font> (JNDI) 1.2
<br>
Optional Package
</h1>
</center>
<hr SIZE=3 NOSHADE WIDTH="100%">
<P><FONT SIZE=-1>Please send feedback to
<a href="mailto:jndi@java.sun.com">jndi@java.sun.com</a></FONT>
<P>
<P><I>Table of Contents</I>
<UL>
<LI>
<A HREF="#INTRO">Introduction</A></LI>
<LI>
<A HREF="#JDK12">Java<sup>TM</sup> 2 SDK, Standard Edition, v 1.2.x</A></LI>
<LI>
<A HREF="#JDK11">JDK<sup>TM</sup> 1.1.x</A></LI>
</UL>
<P>
<HR>
<P>
<A NAME="INTRO">
<H2>Introduction</H2>
<p>
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 <a href=http://java.sun.com/products/jndi/tutorial>JNDI Tutorial</a>
for detailed descriptions and examples.
<HR>
<p>
<A NAME="JDK12">
<H2>Java 2 SDK, Standard Edition, v 1.2.x
</H2>
<p>
<h4>Software Dependencies</h4>
<ul>
<li>
One or more <a href=http://java.sun.com/products/jndi/serviceproviders.html>
JNDI 1.2 service providers</a>.
</ul>
<h4>Software Installation</h4>
<ol>
<li>Unzip the distribution file to get a <tt>lib</tt> directory.
<li>If you are using JNDI as an <em>installed</em>
extension, copy the <tt>jndi.jar</tt> file
from the <tt>lib</tt> directory to the <tt>$JAVA_HOME/jre/lib/ext</tt> directory.
<li>If you are not using JNDI as an installed extension,
copy the <tt>jndi.jar</tt> file to its permanent location and add its location
to your classpath.
</ol>
<a NAME=SEC><h4>Security Considerations</h4></a>
When a <tt>Reference</tt> 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
<tt>java.net.SocketPermission</tt>; if the URL scheme is "file", you
must grant the application the appropriate
<tt>java.io.FilePermission</tt>.
<p>
If you are using JNDI as an installed extension, that is, <tt>jndi.jar</tt>
has been installed in the <tt>$JAVA_HOME/jre/lib/ext</tt> directory,
you need to take no further action.
<p>
Otherwise, you must grant the following permissions to <tt>jndi.jar</tt>:
<p>
<pre>
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";
</pre>
You must also grant the permissions required for class loading
described above to <tt>jndi.jar</tt>.
<p>
In addition, you must grant the following permission <tt>jndi.jar</tt>
if the application/applet code is loaded using a different classloader
than the one that loaded <tt>jndi.jar</tt>. If the application/applet
code is in the same classpath as <tt>jndi.jar</tt>, then you <em>do
not</em> need to do this.
<pre>
permission java.lang.RuntimePermission "getClassLoader";
</pre>
<hr>
<p>
<A NAME="JDK11">
<H2>JDK 1.1.x</h2>
<p>
<h4>Software Dependencies</h4>
<ul>
<li>
One or more <a href=http://java.sun.com/products/jndi/serviceproviders.html>
JNDI 1.2 service providers</a>.
</ul>
<h4>Software Installation</h4>
<ol>
<li>Unzip the distribution file to get a <tt>lib</tt> directory.
<li>Copy the <tt>jndi.jar</tt>
from the <tt>lib</tt> directory to its permanent location.
<li>Add the location of the <tt>jndi.jar</tt> to your classpath.
</ol>
<h4>Security Considerations</h4>
When a <tt>Reference</tt> 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 <tt>RMIClassLoader</tt>. In order for the class loading
to succeed, the application must have installed
a security manager.
For example, you can install the <tt>RMISecurityManager</tt> as follows:
<blockquote>
<pre>
System.setSecurityManager(new java.rmi.RMISecurityManager());
</pre>
</blockquote>
<HR SIZE=3 NOSHADE WIDTH=100%>
<br><i>Copyright © 1999 Sun Microsystems, Inc., All Rights Reserved.</i>
</body>
</html>
jndi所依赖的jar包
5星 · 超过95%的资源 需积分: 24 123 浏览量
2015-11-17
19:52:09
上传
评论 1
收藏 173KB ZIP 举报
j_a_d_e
- 粉丝: 6
- 资源: 5
最新资源
- 华为OD介绍.doc华为OD介绍.doc
- 实验7-定时器的定时实验.docx
- 基于matlab实现的中文字符的识别代码.rar
- 微信小程序设计方法.doc
- 基于matlab实现的微分先行PID控制实现对液位的控制
- 基于matlab实现的图像拼接,效果非常好,用matlab实现的.rar
- 基于matlab实现的图像拼接,所谓图像拼接就是将有共同点的两张或者多张图像进行融合.rar
- 基于matlab实现的图像处理的程序,能够将一个破碎的图像进行拼接.rar
- 基于matlab实现的三轴无刷云台控制代码,当前版本0.3G,可配置于无人机的正下方,可稳定采集图像.rar
- 基于matlab实现的同步电机模型的MATLAB仿真论文资料.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈