import java.io.*;
public class ftp {
public ftp() {
URL url = new URL("ftp://username:password@ftp.whatever.com/file.zip;type=i");
URLConnection con = url.openConnection();
BufferedInputStream in = new BufferedInputStream(con.getInputStream());
FileOutputStream out = new FileOutputStream("C:\\file.zip");
int i = 0;
byte[] bytesIn = new byte[1024];
while ((i = in.read(bytesIn)) >= 0)
{
out.write(bytesIn, 0, i);
}
out.close();
in.close();
}
}
above are the codes I've found but I cant seem to compile the codes. It says afew errors: "cannot find symbol class URL, cannot find symbol class URLConnection". What did I left out??