Which JRE am I using?

后端 未结 9 1222
暗喜
暗喜 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:08

    Open a command prompt:

     Version:  java -version
     Location: where java (in Windows)
               which java (in Unix, Linux, and Mac)
    

    To set Java home in Windows:

    Right click on My computerPropertiesAdvanced system settingsEnvironment VariableSystem VariableNew. Give the name as JAVA_HOME and the value as (e.g.) c:\programfiles\jdk

    Select Path and click Edit, and keep it in the beginning as: %JAVA_HOME%\bin;...remaining settings goes here

提交回复
热议问题