Get the App
SLTechnology News&Howtos  ›  Development  › 

What is it like for Eclipse to find the JVM sequence mechanism?

Shulou Source: shulou.com Published: 2022-06-03 01:20:19 10月20日 Update

Eclipse looks for what the sequential mechanism of JVM is like. I believe many inexperienced people are at a loss about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

If you don't have any JRE installed on your machine (or JDK, which is not distinguished in this article), clicking eclipse.exe will mistakenly report that you can't find JRE. At this point, you can install a JRE, or copy the JRE directory directly to the eclipse installation directory.

Talking about the sequence Mechanism of Eclipse searching for JVM (JRE)

Eclipse is also an ordinary Java program, so there must be a JRE as the running environment. This article will briefly talk about the sequential mechanism of Eclipse's search for JVM (JRE).

If you don't have any JRE installed on your machine (or JDK, which is not distinguished in this article), clicking eclipse.exe will mistakenly report that you can't find JRE. At this point, you can install a JRE, or copy the JRE directory directly to the eclipse installation directory.

You can specify a different version of JRE for each project in Eclipse, such as Project A compiled using JDK1.4 and Project B compiled using JDK1.5. This version of JDK is not directly related to Eclipse running JRE.

The JDK version of the project is easy to modify, so what about any JRE used to start a specified Eclipse?

The order in which Eclipse's JVM starts to look for JRE is: if the-vm parameter is configured in eclipse.ini, then use the JRE; specified in this parameter. Otherwise, check whether there is a JRE folder under the eclipse installation directory. If so, use this JRE;. Otherwise, go to the system to find the installed JRE, and report an error if you can't find it.

So if you don't want to uninstall other JDK, there are two ways: (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, and use the-vm command line argument example:-vmc:\ jre\ bin\ javaw.exe.

After reading the above, have you mastered how Eclipse looks for the sequence mechanism of JVM? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Directory order project mechanism parameter copy file method version run content folder more machine problem report compile different ordinary helpless Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno NVidia Shulou Technology Huawei