Are you sure you are actually getting a MalformedPatternException? I
tried something like this with commons-net-1.2.2 and got a
NoDefClassFoundException at runtime looking for
MalformedPatternException.class. The commons-net package also seems to
require the package org/apache/oro/text/regex. This package is
available as jakarta-oro-2.0.8.jar .
Just a thought.
Skip Hodgson
Gary Yasuda wrote:
I just downloaded the new Jakarta Commons Net 1.3.0
library. I am trying to use the FTPClient and FTPFile
classes. Right now, I'm trying to use this on two
HP-UX 11.11 systems running WU-FTP 2.6.1. This is a
snippet of my code:
import org.apache.commons.net.ftp.*;
try {
FTPClient ftp = new FTPClient();
ftp.connect("server");
ftp.login("root", "password");
String dir = "/home/root";
FTPFile[] files = ftp.listFiles(dir);
} catch (Exception e) {
e.printStackTrace();
}
I thought I typed this in just like the example
figuring this will auto-detect the parser. Logging in
as "root", I figure there should be no permission
problems. The directory "/home/root" does exist. The
line with the FTPFile declaration keeps throwing a
MalformedPatternException. I also tried
ftp.listFiles("org.apache.commons.net.ftp.parser.EnterpriseUnixFTPFileEntryParser",
dir) but that did not work either.
Any suggestions would be appreciated in debugging
this.
Gary
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]