2010-02-17 162 views

回答

6

您是否嘗試過編碼這些字符,即username%40domain.com:password

String ftpUser = URLEncoder.encode(username, "UTF-8"); 
String ftpPass = URLEncoder.encode(password, "UTF-8"); 
String url = String.format("ftp://%s:%[email protected]", ftpUser, ftpPass); 
+0

謝謝你的提示,它的工作後,我感動「:」出從URLEncoder.encode() – Demiurg 2010-02-17 14:05:52

+0

我有同樣的問題,你能告訴我你的意思(我感動是什麼「:」出來來自URLEncoder.encode())???? 此解決方案會導致錯誤:「無法連接到服務器:無法登錄到服務器(PASS):」 – Wael 2017-01-11 10:58:29