|
Java™ by example!
|
|
|
How do I get started with the JNDI file system provider?
The JNDI architecture allows you to access various naming and directory services, through a standard interface, mainly through the Context and DirContext interfaces. Sun has written an implementation of these interfaces to access the filesystem: the filesystem service provider. It can be downloaded from http://java.sun.com/products/jndi/serviceproviders.html. The following example shows you how to get a File object using the filesystem service provider. Make sure you have added the following JARs to your classpath:
Note: if you specify a directory, you'll get an instance of a class that implements the Context interface, a JNDI subtree. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|