Exception in thread "Main" Java. Lang. noclassdeffounderror

Source: Internet
Author: User

Recently, Hu HU was playing a Java game called "tank Wars ". Write a class using Java. Of course, many interfaces have been designed in the game, and you only need to write the content in it. To put it bluntly, exerciseAlgorithm. At present, I have not reached the specific encoding process. Java is what we learned in the next semester ...... I have to sigh: different levels have different things.

 

After successfully installing the Java environment (JDK (Java Development Kit), I didn't respond to any problems. I asked the question, and said, "That's right ~~" I got it! Then configure the environment variables. Now, you can officially enter the topic ......

 

I checked the environment variables from the Internet. To put it bluntly, I gave a variable. This variable can be either a value or a path (it seems that the path is also a value, the amount ......). This variable is used to make the system andProgramTo complete the work. For Java configuration environment variables, it tells the system that when the system is required to run a program without telling it the complete path, in addition to finding this program under the current directory, the system should also find the program under those directories. In any case, you can use the online examples and those who win the honor to know how to deal with this thing. The next step is to run a simple helloworld program. The problem is. paste it in notepad.Code, Compilation is also a line that cannot be executed, always say exception in thread "Main" Java. Lang. noclassdeffounderror ......

After half a day, I still did not know that the environment variable needs to be restarted to take effect! Next we will see the long-awaited helloworld.

 

Think: Why does it need to be restarted to change the environment variables? It seems that some operations on the computer also need to be restarted. Why?

 

the truth is actually very simple. A metaphor on the internet is quite appropriate. What if one day God needs to change the atomic structure? Restart the whole world! What do you understand? That is to say, what you are currently using (most of which are underlying) cannot take effect immediately. That is to say, it is impossible for God to re-operate each atom to change the atomic structure, what it can do is to end the world and start with a new rule. So if the next underlying operation does not work, restart it!

God, the analogy is too simple ~~

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.