Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.7k views
in Java FTP by (200 points)
I have the edtftpj-1.5.2 extension and use it in an application I built. It compiles and runs fine on my machine with its SDK and JRE and bells and whistles. But users who try to run my app get the error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPMessageListener

What do I need to do to allow users (who only have the JRE) to run my app using this edtftpj extension?

Ken

4 Answers

0 votes
by (162k points)
You don't need the JDK, only the JRE for edtFTPj/PRO.

Does their CLASSPATH contain edtftpjpro.jar? The FTPMessageListener class is in that jar file (you can verify this by renaming the jar to a zip file and looking inside).

If they do, another possibility is that they have edtftpj.jar in their CLASSPATH (our free Java library). This contains the same class, and having both jars in the CLASSPATH may mess things up.

If they are running in an application server, make sure there is only one copy of the jar being loaded.
0 votes
by (200 points)
When you say it needs to be added to the classpath, does that mean I need to add the edtftpj-1.5.2.jar file to the jar containing my application, and then include the classpath in the command line to start the application?

Sorry, but I've always been confused on this.

Ken
0 votes
by (200 points)
I figured it out. I have to add:

Class-Path: edtftpj-1.5.2.jar

to my manifest file and make sure this file is put in the same directory as my application on the users machine. Whew.

All things are hard until they are easy.

Thanks for your help.

Ken
0 votes
by (162k points)
Ok good. What kind of application is it? Do they just click on a jar file to execute it, hence other jars need to be referenced in the manifest?

Categories

...