On the sequential mechanism of eclipse searching JVM (JRE)

Source: Internet
Author: User

Turn from: Http://blog.csdn.net/teedry/article/details/6666850Eclipse is also an ordinary Java program, so there must be a JRE as the operating environment.
If you do not have any JRE (or JDK) installed on your machine, then clicking Eclipse.exe will make an error saying that the JRE could not be found. You can install a JRE at this point, or copy the JRE directory directly to the Eclipse installation directory.
You can specify different JRE versions for your project in each project in eclipse, such as a project using JDK1.4 compilation, and B projects using JDK1.5 compilation. This JDK version is not directly related to the Eclipse run JRE.
The JDK version of the project is easy to modify, so what is the JRE used to specify Eclipse startup?
The order in which the JVM was used to find the JRE when it was launched was to use the JRE specified by this parameter if the-VM parameter was configured in Eclipse.ini, or to see if there is a JRE folder under the Eclipse installation directory, or if any, use the JRE; otherwise, go to the system to find the installed JRE , and if you can't find it, you'll get an error.
So if you do not want to uninstall the other JDK, you can have the following methods:
(1) Copy the JRE folder you want to use directly to the Eclipse directory, which is a common method for lazy people
(2) Modify the Eclipse.ini file, add the-VM parameter, specify the address of the virtual machine to run, use the-VM command-line argument example:-vmc:\jre\bin\javaw.exe
(3) Modify MyEclipse or Eclipse-initiated shortcuts. On the shortcut "right"----> "Properties" for example: By default, the shortcut properties for my myeclipse are:
Target "D:\Program files\myeclipse 6.0\eclipse\eclipse.exe"-VM "D:\Program files\myeclipse 6.0\jre\bin\javaw.exe"
Starting position "D:\Program files\myeclipse 6.0\eclipse"
Just change the content of the target, for example I changed to:
"D:\Program files\myeclipse 6.0\eclipse\eclipse.exe"-VM "D:\Program Files\jdk1.6.0_24\bin\javaw.exe"
To know the version of the JVM that your myeclipse started with, you can view it in the following ways:
After starting MyEclipse, click "Help"--"MyEclipse Enterprise Workbench"-click "Configuration Details" button, will pop up myeclipse startup parameter information , you can find information similar to the following:
-vm
D:\Program Files\jdk1.6.0_24\bin\javaw.exe
That's what I've been doing with the JVM.

About Eclipse's search for JVM (JRE) sequential mechanism (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.