Hi,
I have downloaded Java FTP Client from http://www.enterprisedt.com/downloads.html but don't know how to use it. I have unzipped the downloaded zip file to c:\ftp-1.2.1 and add my classpath as follows:
c:\ftp-1.2.1\ftp.jar
and my source code as follows:
import com.enterprisedt.net.ftp.*;
import java.io.*;
public class FTPTest
{
public static void main (String [] args)
{
try{
Connect();
}
catch(FTPException e){
System.err.println(e);
}
}
static void Connect() throws FTPException{
try{
FTPClient f = new FTPClient("www.abc.com");
}
catch(FTPException e){
System.err.println(e);
}
}
}
but the system keep on saying that :
unreported exception java.io.IOException; must be caught or declared to be thrown
FTPClient f = new FTPClient("www.abc.com");
1 error
Pls help, thanks !
regards,
kmthien
I have downloaded Java FTP Client from http://www.enterprisedt.com/downloads.html but don't know how to use it. I have unzipped the downloaded zip file to c:\ftp-1.2.1 and add my classpath as follows:
c:\ftp-1.2.1\ftp.jar
and my source code as follows:
import com.enterprisedt.net.ftp.*;
import java.io.*;
public class FTPTest
{
public static void main (String [] args)
{
try{
Connect();
}
catch(FTPException e){
System.err.println(e);
}
}
static void Connect() throws FTPException{
try{
FTPClient f = new FTPClient("www.abc.com");
}
catch(FTPException e){
System.err.println(e);
}
}
}
but the system keep on saying that :
unreported exception java.io.IOException; must be caught or declared to be thrown
FTPClient f = new FTPClient("www.abc.com");
1 error
Pls help, thanks !
regards,
kmthien
