Setting the JVM via the command line on Windows

后端 未结 4 1731
长发绾君心
长发绾君心 2020-12-13 19:45

Is it possible to specify the JVM to use when you call \"java jar jar_name.jar\" . I have two JVM installed on my machine. I can not change JAVA_HOME as it may break code th

4条回答
  •  有刺的猬
    2020-12-13 19:52

    You should be able to do this via the command line arguments, assuming these are Sun VMs installed using the usual Windows InstallShield mechanisms with the JVM finder EXE in system32.

    Type java -help for the options. In particular, see:

    -version:
                  require the specified version to run
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    

提交回复
热议问题