JDK version issues in eclipse

Source: Internet
Author: User
Tags java se

questions raised:

Today, when learning the SSM framework, you encounter a problem:

I use the spring3.0 version, the eclipse4.6 version, the jdk1.8 development environment,

When setting up the framework, follow the steps to complete the setup, but the runtime error is as follows:

    

Error reason: springmvc3.0 cannot run in jdk1.8 version, so the JDK needs to be replaced.

Solution 1: I reinstall jdk1.7 directly, and then the version of the configuration environment variable is also changed to jdk1.7. (JDK version replacement detailed operation as follows )

Then change the JDK configuration for the project and the JDK configuration for Tomcat in Eclipse. (JDK configuration details are as follows )

Scenario issue: After the version changes in the environment variable, it is discovered that eclipse cannot be opened. The following error is reported:

              

Solution 2: The above problem is because eclipse4.6 only supports jdk1.8 and above,

To solve the above problem: we need to change the JDK version of the environment variable to jdk1.8 and then configure the JDK to 1.7 in the project.

I. The relationship between JDK, JRE, and JVM

The JDK (Java development Kit) is the product for Java developers and is the core of the entire Java, including the Java Runtime Environment JRE, Java tools, and Java base class libraries.

Java Runtime Environment (JRE) is a collection of environments necessary to run Java programs, including the JVM standard implementation and the Java Core Class library.

The JVM is the abbreviation for Java Virtual machine (Java VM), the most central part of the entire Java implementation cross-platform, capable of running software programs written in the Java language.

JDK (Java development Kit)The JDK is the Java SDK and is the product of Sun Microsystems for Java developers.  The JDK contains the JRE, in the JDK installation directory, there is a directory named JRE, there are two folders Bin and Lib, where it can be considered that the bin is the jvm,lib in the JVM is required to work the class library, and the JVM and Lib are called the JRE.  The JDK is the core of the entire Java, including the Java Runtime Environment JRE (Java Runtime envirnment), a stack of Java tools (JAVAC/JAVA/JDB, etc.), and a Java-based class library (that is, the Java API includes Rt.jar).  ①se (J2SE), Standard Edition, is a version we typically use, starting with JDK 5.0 and renaming Java SE.  ②ee (EE), Enterprise Edition, Corporate Edition, uses this JDK to develop the Java EE application, starting with JDK 5.0, and renaming it to the JavaScript. ③me (J2ME), Micro Edition, is primarily used for Java applications on mobile devices and embedded devices, starting with JDK 5.0 and renaming Java ME. Java Runtime Environment (JRE)is an essential running environment for running programs written in the Java language.  It is also through which Java developers are able to publish their own programs to the user and let them use them.  The RE contains Java Virtual machine (JVM), runtime class libraries, and Java Application Launcher, which are the necessary components for running Java programs. Unlike the familiar JDK, the JRE is a Java runtime environment, not a development environment, so it does not contain any development tools, such as compilers and debuggers, but is intended for users who use Java programs. JVM (Java Virtual machine)Is the Java virtual machine that we often say, it is the entire Java implementation cross-platform of the most core part, all Java programs will be compiled into a. class file, this class file can be executed on the virtual machine.  This means that class does not directly correspond to the machine's operating system, but rather interacts with the operating system indirectly by the virtual machine, which interprets the program to the local system for execution.  Only the JVM cannot be executed as class, because the JVM needs to invoke the class library lib that is required to interpret the class, and the JRE contains the Lib class library. The JVM masks information that is relevant to the operating system platform, allowing Java programs to run without modification on multiple platforms by generating only the target code (bytecode) that runs on the Java virtual machine. Two JDK version replacement detailed operation(1) Reconfigure the environment variables java_home, classpath, Path (2) to find the directory C:\Windows\System32, will java.exe,javaw.exe,javaws.exe delete. Third, JDK configuration detailed operation http://jingyan.baidu.com/article/db55b609ab6a1f4ba30a2f2c.html

JDK version issues 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.