久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

FTPClient.listFiles 不工作

FTPClient.listFiles not working(FTPClient.listFiles 不工作)
本文介紹了FTPClient.listFiles 不工作的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在嘗試列出 ftp 服務(wù)器中特定目錄下的所有文件.

I am trying to list all the files under a specific directory in a ftp server.

FTPFile[] subFiles = ftpClient.listFiles("directory");

雖然目錄是有效的,但調(diào)用 listFiles 時代碼卡住了,可能是什么原因.?此外,我想提一下,訪問同一 FTP 服務(wù)器的單獨(dú) netbeans 項(xiàng)目使用相同的代碼可以正常工作,但是 maven 項(xiàng)目存在問題.請幫忙.

Although the directory is a valid one , but the code gets stuck while calling listFiles , what may be the reason. ? Further i would like to mention that a seperate netbeans project accessing the same FTP server is working fine with the same code , but a maven project is having the problem. please help.

推薦答案

嘗試使用被動模式.我假設(shè)你使用的是最新的 commons net 庫(你沒有寫哪個你正在使用的lib).

Try to use passive mode. I assume that you are using the newest commons net library (you didn't write which lib you are using).

下一個方法,嘗試更改文件列表布局.公共庫使用自動檢測,但在某些情況下這不起作用.您可以更改(和測試)另一個文件列表布局,如下所示:

Next approach, try to change the file list layout. The commons lib uses auto-detection but in some cases this doesn't work. You can change (and test) another file list layout as followed:

FTPClientConfig configuration = new FTPClientConfig(FTPClientConfig.TEST_YOURSELF);

FTPClient yourClient = FTPClient(...);
client.configure(conf);

這篇關(guān)于FTPClient.listFiles 不工作的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 中文字幕久久精品 | 91av在线不卡 | 日韩中文电影 | 国产综合av | 久久免费精品 | 亚洲毛片网站 | www.日日干 | 成人免费观看男女羞羞视频 | 精品视频免费 | 欧美日韩综合 | 一级片av| 国产在线精品一区二区三区 | 久久久久国产一区二区三区 | 夜夜草导航 | 蜜桃一区 | 一级一级毛片免费看 | 亚洲欧美一区二区三区视频 | 看片网站在线 | 激情六月丁香婷婷 | 国产精品久久久久久亚洲调教 | 亚洲精品高清视频在线观看 | 国产精品国产精品国产专区不片 | 欧美专区日韩专区 | 亚洲国产精品一区 | 国产成人午夜高潮毛片 | 一区二区三区国产 | 国产综合久久 | 精品一区二区三区不卡 | 欧美日本一区 | a久久| 成人在线视频免费观看 | 精品中文字幕在线观看 | 91xx在线观看| 精品99久久久久久 | 亚洲欧洲精品在线 | 久久三区 | 一区中文 | 91精品国产综合久久久久久丝袜 | 天天弄天天操 | 性高湖久久久久久久久aaaaa | 日本中文字幕在线观看 |