Java FAQ-javac Hello. java cannot find the file solution, javachello. java
Preface
For beginners, there are many difficulties when writing Java code. The following is a common error:
Generally, beginners start learning from Hello and World. After a long time, when they finally want to run javac Hello. java on DOS, they will report an error: the file cannot be found.
Solution
Perform troubleshooting in the following steps:
1. Check whether the environment variables are correctly configured. Output A javac command to output help information, indicating that the configuration information is correct (indicating environment variable configuration, no problem ).
2. If the environment configuration is correct, check whether the path of the java file to be executed is correct.
3. This problem is more likely to occur. .
(In front of me, I am in a hidden state, but I cannot see the. txt and. java files suffixed with the following two files)
My computer is a win10 system. Find the "Hide extensions of known file types" setting method as follows:
This computer --> file --> change folder and search options --> View --> advanced settings --> hide the extension of known files, select the check box to remove
Then you can see whether your suffix is incorrect.
If it is not a win10 system, it should be: My computer --> Tools --> Folder Options --> View -->-hide extensions of known file types. Check the box to remove them.
After the above troubleshooting, my verification is successful and may help you.
Summary
The above is all the content of this article. I hope the content of this article has some reference and learning value for everyone's learning or work. If you have any questions, please leave a message to us, thank you for your support.