Why Eclipse needs a JDK, and MyEclipse doesn't need

Source: Internet
Author: User

1, first of all, the Eclipse people need the JRE, and do not need the JDK, others built-in have. You just have to install a JRE on your computer. As for the JDK, it has built-in
2, Eclise also do not require you JDK or JRE configuration environment variables, after all, friends do not notepad write code, DOS compiled execution
3, myeclise do not need you to install JDK or JRE, if it should have built-in


About the JDK configuration in Eclipse and the version in Tomcat
If your eclipse configuration uses a 1.8 jdk, which is compiled with 1.8 java
But the JRE you've configured in Tomcat is exactly 1.7.
So when you are not familiar with the project, he will give an error, prompting you--you have written and compiled with a high version of Java (JDK), I can not perform a low version


Below is the different processing of the JDK or JRE under eclipse under different circumstances

Brief analysis of Eclipse initiation process
Double-click Eclipse.exe
Load configuration Some information
Looking for Javaw.exe, Jvm.dll
Here are a few scenarios to discuss the process of finding
1. Jdk+jre installed, no environment variables configured (JRE installation directory is "D:\Program files\java\jre7\")
First in the directory where the Exlipse.exe is looking for whether there is. \jre\bin
If this directory is not available
Then traverse the system environment variable path directory
Found "C:\Windows\System32\javaw.exe" in this directory.
Then find the JVM virtual machine
Take Javaw.exe as the current working directory, under Javaw.exe to find
. \J9VM
.. \jre\bin\j9vm\
. \client
.. \jre\bin\client\
. \server
.. \jre\bin\server\
. \classic
.. \jre\bin\classic\
. \jrockit
.. \jre\bin\jrockit\
If these are not found, check the registration form
Hklm\software\javasoft\java Runtime Environment
Read version information, after reading
Read the Runtimelib value under this version, and then find out if there is no this directory
Finally found D:\Program Files\java\jre7\bin\client\jvm.dll.
In the directory where the Jvm.dll is located, return to the two-tier directory to determine the JRE is D:\Program files\java\jre7\
Look for the JRE directory again. \lib\i386 this directory, after successful start loading Eclipse boot required jar file (usually beginning with org.eclipse)
2. Installed the bin directory for the JDK Jdk+jre,path(This is configured as "D:\Program files\java\jdk1.7.0_65\bin\")
First in the directory where the Exlipse.exe is looking for whether there is. \jre\bin
No this directory
Then traverse the system environment variable path directory
Found "D:\Program Files\java\jdk1.7.0_65\bin\javaw.exe" in this directory.
Then find the JVM virtual machine
Take Javaw.exe as the current working directory, under Javaw.exe to find
. \J9VM
.. \jre\bin\j9vm\
. \client
.. \jre\bin\client\
Find the directory with D:\Program files\java\jdk1.7.0_65\jre\bin\client\
Find out if the directory has Jvm.dll
Finally found D:\Program Files\java\jdk1.7.0_65\jre\bin\client\jvm.dll
In the directory where the Jvm.dll is located, return to the two-tier directory to determine the JRE is D:\Program files\java\jdk1.7.0_65\jre
Look for the JRE directory again. \lib\i386 this directory, after successful start loading Eclipse boot required jar file (usually beginning with org.eclipse)
Eclipse3.1\plugins\org.eclipse.jdt.source_3.1.0\src\org.eclipse.jdt.core_3.1.0\src.zip|org\eclipse\jdt\ Internal\compiler
3. JDK installed, no JRE installed, no environment variables configured
First in the directory where the Exlipse.exe is looking for whether there is. \jre\bin
No this directory
Then traverse the system environment variable path directory
No Javaw.exe error found
4. Only the JRE is installed
Situation with 1,eclipse reads the registry value to find the directory of the JRE
Q: So withEclipse Development requires no JDK installation? If not, how will the Java file be compiled into class?
No, the JDT in eclipse comes with a compiler, and the source program is Eclipse3.1\plugins\org.eclipse.jdt.source_3.1.0\src\org.eclipse.jdt.core_3.1.0\ Src.zip|org\eclipse\jdt\internal\compiler Directory (Note your version number)
Ask:why would "C:\Windows\System32\" have Javaw.exe ?This file?
When installing the JRE, the installer has copied 4 files to the "C:\Windows\System32\" directory, respectively, Java.exe, Javaw.exe, Javaws.exe and WindowsAccessBridge.dll. That is, using the java-version command and Java [class file name] to verify that the JDK PATH environment variable is not reliable, the Javac command is the most accurate

Q: is there a. \lib\i386 to find the JRE directory?

Determines whether the JRE used is 32-bit or 64-bit, and 64-bit eclipse cannot use a 32-bit JRE

Why eclipse requires JDK, and MyEclipse does not need

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.