HTTP/2 301
server: AkamaiGHost
content-length: 0
location: https://www.oracle.com/technetwork/java/jndi/docs/
cache-control: max-age=0
expires: Sat, 11 Oct 2025 06:15:59 GMT
date: Sat, 11 Oct 2025 06:15:59 GMT
akamai-grn: 0.94d70b17.1760163359.b9e84629
HTTP/1.1 301 Moved Permanently
Server: AkamaiGHost
Content-Length: 0
Location: https://www.oracle.com/technetwork/java/jndi/docs/
Date: Sat, 11 Oct 2025 06:15:59 GMT
Connection: keep-alive
Server-Timing: cdn-cache; desc=HIT
Server-Timing: edge; dur=1
Akamai-Request-BC: [a=23.3.70.37,b=79847938,c=g,n=IN_KA_BANGALORE,o=9498]
Akamai-GRN: 0.25460317.1760163359.4c26202
Set-Cookie: akaas_aud-seg-ocom-prod=2147483647~rv=90~id=9a26167811b517200574e9ad61710440; path=/
X-Frame-Options: sameorigin
Content-Security-Policy: frame-ancestors 'self' https://my.oracle.com https://eeho.fa.us2.oraclecloud.com https://blogs.oracle.com *.khapps.com *.khapps.jp *.lsapps.oracle.com *.lsapps.oracle.jp *.dev-lsapps.oracle.com https://oraclesso.sharepoint.com https://oracle.sharepoint.com https://partners.oracle.com https://partners-stage.oracle.com https://partners-test.oracle.com https://partners-sit.oracle.com https://partners-dev.oracle.com
X-Content-Type-Options: nosniff
X-XSS-Protection: 1
Origin-Cache-Control: NO_HEADER_PRESENTED
Origin-Edge-Control: NO_HEADER_PRESENTED
Actual-Object-TTL: -1
Server-Timing: ak_p; desc="1760163359657_386090533_79847938_13_13309_1_0_-";dur=1
HTTP/2 301
content-type: text/html; charset=utf-8
content-length: 105
location: /technetwork/java/jndi/docs/index.html
x-oracle-dms-rid: 0:1
x-content-type-options: nosniff
x-oracle-dms-ecid: 006GDjrrnxCFs1KimTDwWJ001G^40009Ej
content-encoding: gzip
strict-transport-security: max-age=31536000
cache-control: max-age=1800
date: Sat, 11 Oct 2025 06:16:00 GMT
vary: Accept-Encoding
set-cookie: X-Oracle-BMC-LBS-Route=8bd9dde87407a7055f948ffaf6c71899d3cc6946; Path=/; Secure; HttpOnly
set-cookie: JSESSIONID=t0LR6XBzxE2v8mPfcRLvwYSvlAGYNY3QW7HGmzRE_9sV4zQExto-!564510856!1530672746; path=/;SameSite=Lax;secure;; HttpOnly
server-timing: cdn-cache; desc=REVALIDATE
server-timing: edge; dur=431
server-timing: origin; dur=847
akamai-request-bc: [a=23.3.70.30,b=476097064,c=g,n=IN_KA_BANGALORE,o=9498],[c=c,n=IN_TN_CHENNAI,o=20940],[a=73,c=o]
akamai-grn: 0.1e460317.1760163359.1c60aa28
x-frame-options: sameorigin
content-security-policy: frame-ancestors 'self' https://my.oracle.com https://eeho.fa.us2.oraclecloud.com https://blogs.oracle.com *.khapps.com *.khapps.jp *.lsapps.oracle.com *.lsapps.oracle.jp *.dev-lsapps.oracle.com https://oraclesso.sharepoint.com https://oracle.sharepoint.com https://partners.oracle.com https://partners-stage.oracle.com https://partners-test.oracle.com https://partners-sit.oracle.com https://partners-dev.oracle.com
x-content-type-options: nosniff
x-xss-protection: 1
origin-cache-control: no-cache, no-store
origin-edge-control: NO_HEADER_PRESENTED
actual-object-ttl: -1
server-timing: ak_p; desc="1760163359692_386090526_476097064_127801_15159_6_7_15";dur=1
HTTP/2 301
content-type: text/html; charset=utf-8
content-length: 8441
location: https://docs.oracle.com/javase/tutorial/jndi/overview/index.html
x-oracle-dms-ecid: 006GDjrsrUYFs1KimTDwWJ000JH0000YWa
status: 301 Moved Permanently
x-oracle-dms-rid: 0:1
x-content-type-options: nosniff
surrogate-control: content="ESI/1.0"
access-control-allow-origin: *
content-encoding: gzip
strict-transport-security: max-age=31536000
cache-control: max-age=1800
date: Sat, 11 Oct 2025 06:16:01 GMT
vary: Accept-Encoding
server-timing: cdn-cache; desc=REVALIDATE
server-timing: edge; dur=26
server-timing: origin; dur=404
akamai-request-bc: [a=23.3.70.30,b=476098060,c=g,n=IN_KA_BANGALORE,o=9498],[c=c,n=IN_TN_CHENNAI,o=20940],[c=p,n=IN_TN_CHENNAI,o=20940],[a=73,c=o]
akamai-grn: 0.1e460317.1760163361.1c60ae0c
x-frame-options: sameorigin
content-security-policy: frame-ancestors 'self' https://my.oracle.com https://eeho.fa.us2.oraclecloud.com https://blogs.oracle.com *.khapps.com *.khapps.jp *.lsapps.oracle.com *.lsapps.oracle.jp *.dev-lsapps.oracle.com https://oraclesso.sharepoint.com https://oracle.sharepoint.com https://partners.oracle.com https://partners-stage.oracle.com https://partners-test.oracle.com https://partners-sit.oracle.com https://partners-dev.oracle.com
x-content-type-options: nosniff
x-xss-protection: 1
origin-cache-control: no-cache, no-store
origin-edge-control: NO_HEADER_PRESENTED
actual-object-ttl: -1
server-timing: ak_p; desc="1760163360998_386090526_476098060_42995_15373_5_0_15";dur=1
HTTP/1.1 200 OK
Server: AkamaiNetStorage
Content-Type: text/html
ETag: "fb449d068f8a731557f34db2ff222957:1730815227.58915"
Vary: Accept-Encoding
Content-Encoding: gzip
Cache-Control: max-age=21600
Date: Sat, 11 Oct 2025 06:16:03 GMT
Content-Length: 5829
Connection: keep-alive
The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Dev.java for updated tutorials taking advantage of the latest releases.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
Lesson: Overview of JNDI
The Java Naming and Directory Interface™ (JNDI) is an application programming interface (API) that provides naming and directory functionality to applications written using the Java™ programming language. It is defined to be independent of any specific directory service implementation. Thus a variety of directories -new, emerging, and already deployed can be accessed in a common way.
Architecture
The JNDI architecture consists of an API and a service provider interface (SPI). Java applications use the JNDI API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, thereby allowing the Java application using the JNDI API to access their services. See the following figure:

Packaging
JNDI is included in the Java SE Platform. To use the JNDI, you must have the JNDI classes and one or more service providers. The JDK includes service providers for the following naming/directory services:
- Lightweight Directory Access Protocol (LDAP)
- Common Object Request Broker Architecture (CORBA) Common Object Services (COS) name service
- Java Remote Method Invocation (RMI) Registry
- Domain Name Service (DNS)
Other service providers can be downloaded from the
JNDI page or obtained from other vendors.
The JNDI is divided into five packages:
The next part of the lesson has a brief description of the JNDI packages.