Cocould not find the main class, program will exit.

Source: Internet
Author: User

A section that can run normally in jcreatorCodeIn myeclipse, cocould not find the main class, program will exit. The code is correct, yesProgram. The Cause and solution are as follows: the error is reported because we tried to run the Java class file compiled by JDK of a later version on the JVM of a later version. Because the format of the class file generated by JDK of a higher version may be different from that of JDK of a lower version. Class. In this way, the lower version of JVM cannot explain and execute this. Class file, and will throw the cocould not find
The main class. program will exit does not support the class version error. This error is especially evident in versions earlier than JDK 5 and JDK 5. Because JDK 5 has made a lot of enhancements in the Java syntax and introduced some new elements of the. Class file, leading to the failure to interpret and execute the. Class file in the old version of JVM. Even if this class does not use any new elements of JDK 5, The. Class file generated by JDK 5 and jdk1.4 and its previous JVM cannot be identified.

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.