Hi!
I'm trying to use the package sun.net.ftp to implement a ftp session :
public ftp_cls () {
FtpClient myFtp = new FtpClient();
try {
int ch;
myFtp.openServer("localhost"
;
myFtp.login("anonymous","anonymous"
;
myFtp.cd("mine"
;
myFtp.binary();
TelnetOutputStream tos = fcMyFtp.put("myfile.txt"
;
....
}catch( IOException e ) {
e.printStackTrace();
}
public static void main(String args[]) {
ftp_cls f = new ftp_cls();
}
}
When i'm executing it, i get a sun.net.ftp.FtpProtocolException: PORT
at sun.net.ftp.FtpClient.openDataConnection(FtpClient.java:219)
at sun.net.ftp.FtpClient.put(FtpClient.java:349)
....
Can anyone give me an explanation?
Thanks in advance
A.
I'm trying to use the package sun.net.ftp to implement a ftp session :
public ftp_cls () {
FtpClient myFtp = new FtpClient();
try {
int ch;
myFtp.openServer("localhost"
myFtp.login("anonymous","anonymous"
myFtp.cd("mine"
myFtp.binary();
TelnetOutputStream tos = fcMyFtp.put("myfile.txt"
....
}catch( IOException e ) {
e.printStackTrace();
}
public static void main(String args[]) {
ftp_cls f = new ftp_cls();
}
}
When i'm executing it, i get a sun.net.ftp.FtpProtocolException: PORT
at sun.net.ftp.FtpClient.openDataConnection(FtpClient.java:219)
at sun.net.ftp.FtpClient.put(FtpClient.java:349)
....
Can anyone give me an explanation?
Thanks in advance
A.