the codes are follows. werite "abc" on terminal and nothing anything.
i check on filezilla and i see uploaded the file , but not listed in the directory.
Code:
public void uploadDumpFiles2Server(){
String server="ftp.domain.tr";
String user="username";
String password="password";
String path="/httpdocs";
String filename="user.props";
try {
FtpClient ftpClient=new FtpClient();
ftpClient.openServer(server);
ftpClient.login(user, password);
if (path.length()!=0) ftpClient.cd(path);
ftpClient.binary();
TelnetOutputStream os=ftpClient.put(filename);
File file_in=new File(filename);
FileInputStream is=new FileInputStream(file_in);
byte[] bytes=new byte[1024];
int c;
while ((c=is.read(bytes))!=-1){
os.write(bytes,0,c);}
is.close();
Scanner sc = new Scanner(ftpClient.list());
while(sc.hasNextLine()){
System.out.println(sc.nextLine());
}
os.close();
ftpClient.closeServer();
} catch (IOException ex) {;
System.out.println(ex.toString());
}