Java-javac Hello. java cannot find the file, javachello. java

Source: Internet
Author: User

Java-javac Hello. java cannot find the file, javachello. java

At the beginning of writing Java code, you may encounter many difficulties. The following is a common error:

For beginners, it is generally learned from Hello and World. After a long time, I have to run javac Hello on DOS. in java, an error is reported: the file cannot be found.

To solve this problem, perform the following steps:

1. After configuring the path, close all previously opened dos and re-open it.

In this way, it can redefine and identify the new path you configured.

2. 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 ).

3. If the environment is correctly configured, check whether the path of the executed java file is correct.

4. 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 --> hides the extensions of known files,Uncheck this option

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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.