各位达人:
 FtpClient ftpClient = new FtpClient();
        ftpClient.openServer(ent.getFtpAddress());
        ftpClient.login(ent.getFtpUser(), ent.getFtpPassword());
        ftpClient.ascii();
        ftpClient.cd(ent.getFtpPath());
        String fg = new String("\\");
        int index = strPath.lastIndexOf(fg);
        String filename = strPath.substring(index+1);
        File localFile = new File(strPath);
        RandomAccessFile sendFile = new RandomAccessFile(strPath,"r");
        sendFile.seek(0);
        TelnetOutputStream outs = ftpClient.put(filename);
        DataOutputStream outputs = new DataOutputStream(outs);    
在java调用以上程序时,报错sun.net.ftp.FtpProtocolException: PORT :501 PORT not allowed after EPSV ALL
我直接在cmd中用ftp就可以,java调用就不行。
请教什么原因?如何解决?急!