Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.3k views
in Java FTP by
Exception in thread "main" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPClient

Can anyone help with this error.I'm compiling like this
javac -classpath .;C:\edtftpj-1.5.1\lib\edtftpj.jar *.java

and trying to run the code like this

java -classpath .;C:\edtftpj-1.5.1\lib\edtftpj.jar -jar bode.jar

it compiles ok but falls over when i try to run it.Thanks in advance

1 Answer

0 votes
by
No one answered!
Anyways, my issue was trying to call classes in jar file from a a jar file! Easily done by adding the jar file containing the classes to be called in the manifest of the running jar file.

So fo example...A.jar contains some classes i want to call in B.jar. I create a manfest containing this line at the end
Class-Path: A.jar <cr>

Then I create B.jar .....jar -cmf "manifestfile" B.jar *.classes

Categories

...