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

NoClassDefFound error in applet

Saurabh Manohar

Joined: Nov 15, 2004
Posts: 1
Hi all,
I am writing an applet and using some Open source libraries in it. The clas file compiles well, but when I run the applet in my browser, I get a java.lang.NoClassDefFound error. I am using Tomcat 5.0 as my web server and JVM 1.4.2. If I rewrite the same code as an application, it works fine. But the applet doesn't. What am I missing here?

Thanks in advance

Saurabh Manohar
Joe Ess

Joined: Oct 29, 2001
Posts: 9167

All of the class files an applet depends on must be available on the server for download. The application works because you probably have the dependency in your classpath. Take a look at the Java Tutorial: Using the APPLET tag for your options.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: NoClassDefFound error in applet
It's not a secret anymore!