Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sun.net.ftp.FtpProtocolException: PORT

Status
Not open for further replies.

aliana

Programmer
Mar 22, 2003
1
FR
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top