Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.io.FileNotFoundException: "C:/Users/Joe/Desktop/file.txt" (The filename, directory name, or volume label syntax is incorrect)

i have this code :

BufferedReader in = new BufferedReader
(new InputStreamReader(System.in));
System.out.print("Public Key to encrypt with: ");
String publicKeyFilename = in.readLine();
FileInputStream fis = new FileInputStream(publicKeyFilename);

when i enter the destination of the file "C:/Users/Joe/Desktop/file.txt", the result is this error:

java.io.FileNotFoundException: "C:/Users/Joe/Desktop/file.txt" (The filename, directory name, or volume label syntax is incorrect)

but the file exist, so what can i do?

Thank u..

like image 729
user3077162 Avatar asked Nov 02 '22 09:11

user3077162


1 Answers

when i enter the destination of the file "C:/Users/Joe/Desktop/file.txt"

Filename should be provided without quotes ("")

like image 93
Dedkov Vadim Avatar answered Nov 15 '22 10:11

Dedkov Vadim