This lesson contains two examples. The first example shows you how to look up an object from a naming service, in this case the file system. The second example shows you how to read an attribute from a directory service, in this case an LDAP directory.
If you have problems compiling or running these examples, then see the Common Problems lesson. That lesson describes problems that you might encounter when trying to compile and run the examples or when using the JNDI in general and offers solutions that you can try.