开发者

File Not Found Exception apache common

开发者 https://www.devze.com 2023-02-18 07:35 出处:网络
Currently I figured out how to connect to my FTP with apache common to download things (enter IP not the ftp.xxx adress). But now I can an FileNotFound, eventhough it really is there and has every开发

Currently I figured out how to connect to my FTP with apache common to download things (enter IP not the ftp.xxx adress). But now I can an FileNotFound, eventhough it really is there and has every开发者_如何转开发thing set to 777

I already saw that apache is adding the "/" by himself so normally It should work, uploading is no problem. Any ideas? I can open the file if I enter it in my URL bar


You should create a file in your system, something like:

File f = new File("path/to/file");
if (f.exists() == false)
{
   f.createNewFile();
}
FileOutputStream fos = new FileOutputStream(f.getAbsoluteFile());
client.retrieveFile("Filenametoretrieve", fos);
0

精彩评论

暂无评论...
验证码 换一张
取 消