![]() ![]() ![]() ![]() |
Common Problems (and Their Solutions) |
Class or Package Not Found
Problem: You get Package javax.naming not found or similar errors complaining about missing classes.
Cause: You have not included the JNDI classes (jndi.jar) in your classpath when you compile your program, or you have not installed the JNDI classes properly as an extension, or you have mistyped the class or package name.
Solution: When using the Java 2 SDK, v 1.3, the JNDI classes are already included in the SDK. If you get a class or package not found error, double-check the spelling of the package and class.
If you are not using the Java 2 SDK, v 1.3, you need to download the JNDI classes and include them in your development environment. The way you include the JNDI classes depends on your development environment.
When using the Java 2 SDK, v 1.2, make sure that jndi.jar is in the JAVA_HOME/jre/lib/ext directory, where JAVA_HOME is the directory where the SDK has been installed. When using the JDK 1.1, using the javac compiler, you can either add jndi.jar to your CLASSPATH environment variable or add it to the -classpath option in your javac command line. See the Preparations
lesson for more details.
Java Platform Versions
Problem: You get compilation failures complaining about missing java.* packages or classes.
Cause: You are using an old version of the Java platform.
Solution: You need to use Java 1.1.2 or higher. See http://java.sun.com/products/jdk/1.1/.
![]() ![]() ![]() ![]() |
Common Problems (and Their Solutions) |