the code( in a web application to use ftp transefer files to the ftp server) below can run correctly on windows,linux but on solaris
when on solaris it encounter a java.lang.Error(program need not to process and I don't know how to handle it ,not a exception ) when program runs to 'new FileTransferClient();' ,I find code from this statement don't run because the Error occured at 'new' point
public String upLoad(String pathname){
FileTransferClient fc = null;
String filename = "";
try{
filename = pathname.substring(pathname.lastIndexOf(fs) + 1);
fc = new FileTransferClient(); //program abort at this point
fc.setRemoteHost(FTP_HOST);
fc.setUserName(FTP_USER);
fc.setPassword(FTP_PWD);
fc.connect();
filename = fc.uploadFile(pathname, filename);
File del = new File(pathname);
boolean sc = false;
if(del.exists()){
sc = del.delete();
Logger.info("fix-detect-upLoad--sc.delete(): ", "deleted");
}
if(!sc){
Logger.error(MissionDAO.class.getName(), "not deleted" );
}
}catch(Exception e){
e.printStackTrace();
Logger.error(MissionDAO.class.getName(), "failed " + e.getMessage());
}
return filename;
}