Hi all, I think this is a simple classpath-type problem, but I am stumped. I am using JDK 1.2.2 on a WindowsNT 4.0 workstation. Please advise: I downloaded the Java Advanced Imaging (JAI) extension and installed it in my JDK1.2.2 folder (default installation). When I try to run any of the sample programs, I get errors such as: "Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage at JAIDemo.main". I can see the class in question (javax/media/jai/PlanarImage.class) in a jar file (jai_core.jar) in the following path: h:\java\jdk1.2.2\jre\lib\ext. As near as I can tell from the documentation, this is the appropriate location. Can anyone please tell me what I'm doing wrong? Thanks in advance for your help. Stephanie
For a jar file, you need to include the full path of the jar file itself (not merely the directory it's in) as part of your CLASSPATH. So in this case "h:\java\jdk1.2.2\jre\lib\ext\jai_core.jar" needs to be in your CLASSPATH. It would be nice if the installer took care of this for you, but often they don't.
"I'm not back." - Bill Harding, Twister
Joined: Jun 14, 2000
Jim, Thanks for your response! It's working now. Stephanie
I am not sure what the solution is. But, in this case, putting the jar file in the Classpath isn't one either. The jars in the extensions directory don't have to specified in the classpath. The JVM extensions classloader looks for them automatically. [ June 04, 2002: Message edited by: Aj Manch ]