java - Progam can't see file but it exist. FileNotFoundException -


Then, I am writing FTP server-client but code can not read a file. I mean. Suppose I have a file on the download / download / implant 2.pdf but I get a file not found exception. Even if there is a file and I can see it. I also created a test folder and set it privatization for 777. Still, nothing.

Can netbeans be set as superuser or something? I mean. I just want to copy and paste some, but I can not copy here and paste code if you see anything wrong with it, please share.

  Public static zero copyfile (file, file out) throws IOException {chinal = new file in the file channel (in the input stream) .getChannel (); File channel out channel = new file output stream (outside) .getChannel (); Try {inChannel.transferTo (0, inChannel.size (), outChannel); } Hold (IOException e) {throw e; } Finally {if (chinal! = Null) in china.clos (); If (out channel! = Null) outChannel.close (); }}  

thanks

Do you specify the right path Are the files?

You can try to specify the full path or keep the file in the same directory as the code.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -