Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.6k views
in Java FTP by (162k points)
A user writes:

I downloaded the FTP package you made and tried to run the examples to see how it works.

I got a few errors which tells me that I didn't set something up correctly.

I am attaching screen shots of the env.bat file and the DOS screen after I got the errors.

I have the jdk installed in the default location of C:\Program Files\Java\jdk1.6.0_13

I think the problem might be that I have the examples installed on the D: drive in D:\FTPJavaCode\edtftpj-2.0.4\examples

Can you help me?


We responded saying that the JAVA_HOME environment variable must be set on your PC. Otherwise the script doesn't know where Java is. The user now gets the problem that running env.bat gives an error, "Could not find 'edtftpj.jar'.

env.bat is not intended to be run in the 'howto' directory, but only called from the 'run.bat' scripts in the directories below 'howto'. So change into an example directory and try to run an example.

2 Answers

0 votes
by (320 points)
It is odd that this issue was logged in May of 2004 and I am in May of 2009 with the same issue. My java is installed in the same default directory and my copy of you files is installed in the same location.
My env.bat has -

SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_13

and the second to the last line is

SET CP=.;%JAVA_HOME%\;C:\Program Files\Java\lib\edtftpj.jar

It seems to me that there would be a simple D: drive version of the env.bat.

I copied the edtftpj.jar to the main /lib directory

Is there an easy solution?
0 votes
by (51.6k points)
You misread the dates. Have another look. It says "support2 Joined: 17 May 2004". In other words, support2 joined this forum in 2004. The post date is at the bottom of the message and it says "May 01, 2009". So Bruce actually posted that message two days ago.

Anyway, this is all just basic Java stuff. You have a jar file, edtftpj.jar, that needs to be on the classpath. There's nothing special about this jar file; it's all pure Java and has dependencies on nothing other than the Java libs. If the batch files confuse you then don't use them. Just set the classpath on the command-line explicitly.
java -cp somedir/edtftpj.jar MyClass


- Hans (EnterpriseDT)

Categories

...