I am working on an app and I have to use a certificate and this is the code :
File f = new File("D:\\john.doe.pfx");
When I run the app it gives me this error :
java.io.FileNotFoundException: D:\john.doe.pfx (The filename, directory
name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at testoauth.TestOAUTH.main(TestOAUTH.java:58)
The certificate was in a folder called "proiect oauth" and i got it out and put it directly in D:
I would like to use the file and not give error
The string you are using has invisible unicode characters \u202a
at the start.
It is as if you had:
new File("\u202a\u202aD:\\john.doe.pfx");
which is not the correct path.
Retype the line and omit the invisible characters at the start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With