First of all I’m not a Java programmer, so maybe (hopefully :D) this problem could be very simple to solve.
I’ve wrote a simple applet to send file from client to a remote FTP server with a third-part library. When I run it in my eclipse applet viewer everything works correctly, but when i try it in my web browser I see a message like this:
Exception in thread "thread applet-prova.class-2" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FileTransferClient
at prova.start(prova.java:32)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I suppose there is some compiling/packaging issue… the applet should be well signed so, no security problem should be there
The
NoClassDefFoundErrormeans thatcom/enterprisedt/net/ftp/FileTransferClientwas there at compile time but is missing at runtime.I’m not really an Applet expert but as far as I know, you need to list all dependencies (i.e. including the jar providing the above class) in the
archiveattribute of the<APPLET>tag.If you are using
<OBJECT>or<EMBED>, see Q: How do I specify a JAR file as part of an OBJECT or EMBED tag? in the FAQ.Actually, providing the HTML might help here.