0

I can't seem to even be able to get started using ftp4j.

I have: FTPClient ftp = new FTPClient();
ftp.connect(address); ftp.login(user, pass);

It just keeps saying package ftp does not exist.

Can someone tell me what i'm missing?

Harry
  • 467
  • 1
  • 5
  • 14

2 Answers2

1

This might help you

FTPClient ftp = new FTPClient();
ftp.connect(strHostname,intPort);      //Default port for FTP is 21
ftp.setPassive(true);
ftp.login(strUsername,strPassword);
ftp.setType(FTPClient.TYPE_BINARY);
ftp.disconnect(true);

For more examples check this out

and dont miss out to add ftp4j package in your CLASSPATH

0

Your code is correct but if it says ftp4j package does not exist you need to make sure that you typed:

import it.sauronsoftware.ftp4j.FTPClient;

and you have the package ftp4j-1.7.2.jar in the folder "libs".

zacumbot
  • 13
  • 3