Apache's FTPClient class, anyone?

M

Mikhail Teterin

Hello!

We are trying to use Apache's FTPClient class

http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html

here for a custom program. The program on the first run, but is is supposed
to avoid re-downloading an entire file by only using setRestartOffset().

An attempt to use that method fails -- the retrieveFile() method returns
false. Unfortunately, no exceptions are thrown, and we have no idea, why it
is failing.

The ftp-server does support "reget" -- we tested it with a standard
command-line ftp-client.

Has anyone here used the FTPClient-class? Perhaps, there is a different
implementation with just as liberal a license? Thanks!

-mi
 
Joined
Feb 19, 2009
Messages
1
Reaction score
0
org.apache.commons.net.ftp.FTPClient

Although cant help with your question I'm interested in the answer myself but before I even get that far I get the following error:
java.lang.UnsupportedClassVersionError:

org/apache/commons/net/ftp/FTPClient (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at uk.utils.FTPConnector.main(FTPConnector.java:42)
Exception in thread "main"

Can any one shed some light on this for me??? my code is just this:

public class FTPConnector {
public static void main(String[] args) {

FTPClient ftp1;

try {
ftp1 = new FTPClient ();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top