No. 04 JDK version causes unsupported Major.minor version 52.0 error

Source: Internet
Author: User
Tags unsupported

 

All along, want to change some of the things that you have been accustomed to before.

thank Luchde classmate , let me solve a problem again!

problem cause -->> analysis { jdk version inconsistency }

    • projects developed in Eclipse have a Java build path that can be configured Jdk
    • Compiler Level{eclipse>windows>preferences>java>compiler>compiler can be configured in Java compiler compliance Level

There are two differences :

    • The JDK version of Build path is what the compiler needs to use when you develop the code that you develop in eclipse, giving you the process of compiling the error message.
    • The compiled version number of the Java compiler compliance level, which is the role of this build number, is to be put on the server and run on the server after you have completed the project in the future.

The problem is that the build path is configured with the Jdk,java compiler compliance level configured in the 1.7, but the program requires 1.8 of the JDK, the error is reported, and vice versa.

The JDK version of Build path is the one that the compiler needs to use when you develop it, such as the JDK1.4 that you use to be generic. And the Java compiler compliance level is set by the Java code you have written, according to what JDK version is compiled, For example: set to 1.4, the compiled class file can be run on more than 1.4 JRE, if the use of 5-level compilation, you can not run in the environment of 1.4.

At the time of development in eclipse, the JDK in Build path compiles the class library (that is, you are not using the class in this JDK), and the Java compiler compliance level is the compilation of the syntax of the project (that is, the correctness of the syntax in your project). In the process of development, these two places are all working. So, thebuild path and Java Complier compliance level are consistent with the JDK of the server configuration and there is no problem.

Stanford Parser and JDK version corresponding relationship

j2se 8 = n,

j2se 7 = Wuyi,

j2se 6.0 = $,

j2se 5.0 = $,

JDK 1.3 = +,

JDK 1.1 = $

Reference Documents :
http://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0

Mr. Fat-->> Solution :

Adjust the JDK version to match:

Eclipse>windows>preferences>java>compiler>compiler Compliance Level 1.8

your project Right-click >properties>java compiler>1.8

{If there is an error JavaSE-1.8 (unbounded) After installing jdk1.8, click on the error prompt below to modify the JDK path (eg.e:\java-tools\java\jdk8\jdk1.8.0_92)}

Luchde Problems encountered :

Today, Mr. Fat's students have problems, because my JDK version is 1.8, and they use 1.7, then the students will need to make the following changes
First, change to the local JDK version,

Again, see if you're Eclipse>windows>preferences>java>compiler>compiler compliance level 1.7 , if that's the case

Finally, modify your project, right-click on the project >properties>java compiler>1.7

same as your local. !

, Sweep!

 

No. 04 JDK version causes unsupported Major.minor version 52.0 error

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.