The difference between the JDK version in the Java build path in the Eclipse project and the Java Compiler Compiler compliance level

Source: Internet
Author: User

Here's where you'll find it easier to confuse and set errors in Eclipse. The functions shown are as follows:

The most accurate explanation is as follows:

Build path is the run-time environment

compiler is a compile-time environment

Assuming that your code is generic, and the build Path environment is 1.4 for the 1.5,compiler Environment, a compilation error is displayed and cannot be compiled, but such a Web project can be run in a web container, provided that you easily support 1.5 syntax.

Build path is the environment level of your class file and is not used by compilers, for example, if you use 1.4, you cannot use generics. The compiler compliance level sets the Java code you have written to compile according to what JDK version, For example: Set is 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, will be prompted version too high. In short, as long as the JDK version of Build path is above or equal to the level within compiler compliance levels.

Above transfer from: http://www.iteye.com/problems/51267

The difference between the JDK version in the Java build path in the Eclipse project and the Java Compiler Compiler compliance level (RPM)

Related Article

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.