File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Advanced Imaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Advanced Imaging" Watch "Java Advanced Imaging" New topic

Java Advanced Imaging

Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
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
in a jar file (jai_core.jar) in the following path:
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.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
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
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Thanks for your response! It's working now.
sourabh malhotra

Joined: Jun 03, 2002
Posts: 1
hi!.. i hav eread your problem .. i m facing teh same problem trying to run jai tutor... have also given teh classpath but still cant make it... can some one say y?
Aj Manch
Ranch Hand

Joined: May 07, 2001
Posts: 50
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 ]
I agree. Here's the link:
subject: Java Advanced Imaging
It's not a secret anymore!