When I compile one Java file with javac, it responds with the error not a file
(instead of file not found
):
So I tried to compile
In the first image you posted you can see this:
> dir
Mode Name
-a---l helloworld.java
So, what that l
at the end of the mode means is that helloworld.java
is not a file, it's a symlink. And that's what javac
is telling you.
The example you posted in the second image works because that one is actually a file (see the Mode column says -a----
).
The problem is caused by OneDrive, it seems what we see as files are not actually the files but links that point to those files. To avoid the problem, don't place your java files inside the OneDrive folder.