Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.7k views
in Java FTP by
Hi all,

I'm quite new to java, and I'm in the process of an FTP assignment. I've downloaded the package, but I'm hitting errors about Class Def Not Found, and I can't even run the demo :(. I know that I probably haven't imported these libraries correctly. Also, I'm trying to run this java application from command line (using Cygwin Bash Shell). The following are additional information that may or may not be useful:

demo.bat file:
set JAVA_HOME=C:\opt\java\1_4_2
set CP=.;..\lib\edtftpj.jar
%JAVA_HOME%\bin\javac -classpath %CP% Demo.java

This is what I did:
run the demo.bat file (I noticed that a class file was created)
in cygwin: java Demo <server><user><pass>

Then I get the error
Exception in thread "main" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPMessageListener

When I try to compile it using javac Demo.java, I get errors about not being able to find the package .com.enterprisedt ... , cant find classes, etc.

THANKS IN ADVANCE! (mind the stupidity :))

4 Answers

0 votes
by (162k points)
for starters just run it in cmd.exe
0 votes
by
for starters just run it in cmd.exe


Thanks for the response. However, when I run it in Windows cmd (using the command java Demo.java <server><user><pass>, correct me if i'm wrong), I still get the same exception.

Exception in thread "main" java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPMessageListener
0 votes
by
nevermind, I just got it working, thanks a lot!

If I want to run it using Cygwin (because part of my application is already working in Cygwin), is it really difficult to do?

Thanks again.
0 votes
by
gosh, I can now run it in Cygwin as well.
I was using : in the classpath and not ;

Anyways, thanks for everything :D

Categories

...