Which JRE am I using?

后端 未结 9 1224
暗喜
暗喜 2020-12-02 16:29

There are two varieties of JRE available. Java VM: IBM vs. Sun.

Is there a way to know which JRE I am using through JavaScript or some Java issued command.

9条回答
  •  不知归路
    2020-12-02 17:27

    The Java system property System.getProperty(...) to consult is "java.runtime.name". This will distinguish between "OpenJDK Runtime Environment" and "Java(TM) SE Runtime Environment". They both have the same vendor - "Oracle Corporation".

    This property is also included in the output for java -version.

提交回复
热议问题