Find out what JVM Eclipse is running on

前端 未结 4 2043
广开言路
广开言路 2020-11-27 17:36

I\'m currently trying to tune my Eclipse installation and bumped into the \"-vm\" option. Other posts on SO mentioned that it\'s good to always use the latest JVM available

4条回答
  •  醉梦人生
    2020-11-27 18:02

    According to this thread and this one:

    eclipse will try to locate your JVM used for launching itself by examining your path.

    So, you can:

    • Create a JAVA_HOME environment variable, that points to your actually preferred JDK.
      This way you can easily choose between JDKs installed.

    • Put %JAVA_HOME%\bin in the path, anywhere preceeding \system32, which also contains java, javaw & co binaries.
      This way the java* in the JDK bin directory is invoked whenever it is invoked from the path.

    I believe the other posts tell you how to find what JVM eclipse is using.

    However, I interpreted your question as: "what JVM will eclipse will use when launching itself ?" when no -vm args is used.


    After further research, it appears that eclipse will look for a JRE:

    • either directly under its installation directory (\jre): if you copy the content of any installed JRE in that sub-directory, it will be selected
    • in C:\Program Files\Java\JRE....
    • in the %PATH% (see above)

    Also read this SO answer to see why eclipse will by default select jvm.dll instead of javaw.exe

提交回复
热议问题