Java File create from path in another partition

I am using Windows 10, latest JDK.

System.out.println(new File("F:\\some\\path\\to\\file.wav").getAbsolutePath());

This prints:

F:\path\\to\\project\\folder\F:\\some\\path\\to\\file.wav !!!

Can you please explain what am I mistaking here? I tried even

new File(URI.create("file:///F:/some/path/to/file.wav")) but gives me Exception:

java.lang.IllegalArgumentException: URI has an authority component...

Read More »

By: StackOverFlow - 5 days ago

Related Posts