Switch to different JDK settings in Eclipse

Source: Internet
Author: User

In general, because of project development needs, it is sometimes necessary to consider using different JDK for project building. If the server is running in a JDK6 or JRE6 environment, the client needs to keep the same version for development and integration to avoid some version mismatch errors. Common bug reports that are inconsistent with JDK versions are as follows: Exception in thread "main" Java.lang.UnsupportedClassVersionError: com/kylin/project/generateeclist:unsupported Major.minor version 51.0        at Java.lang.ClassLoa Der.defineclass1 (Native Method)         at Java.lang.ClassLoader.defineClassCond (Classloader.java : 631)         at Java.lang.ClassLoader.defineClass (classloader.java:615)         At Java.security.SecureClassLoader.defineClass (secureclassloader.java:141)         at Java.net.URLClassLoader.defineClass (urlclassloader.java:283)         at java.net.urlclassloader.access$000 (urlclassloader.java:58)         at java.net.urlclassloader$1. Run (urlclassloader.java:197)         at java.security.AccessController.doPrivileged (Native Method )         at Java.net.URLClassLoader.findClass (urlclassloader.java:190)         At Java.lang.ClassLoader.loadClass (classloader.java:306)         at Sun.misc.LauNcher$appclassloader.loadclass (launcher.java:301)         at Java.lang.ClassLoader.loadClass ( classloader.java:247) Could not find the main class:com.kylin.project.GenerateECList. Program'll exit.   eclipse the JDK settings as shown in, click "Windows", "preferences", "Java", "Installed JREs", click "Add ..." button, add a new JDK, assign to the corresponding JDK directory, and set up multiple JDK configurations for the entire workspace.    for specific projects, you still need to open the project properties, for the Java BUiD Path setting operation, to specify the use of targeted JDK. As shown in the: 

Switch between different JDK settings in Eclipse

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.