Run a JAR file using a specific JRE

前端 未结 5 1903
广开言路
广开言路 2020-12-02 10:58

Is there a way on Windows to run a JAR file using a JRE located in a specific folder? Similar to the way Eclipse looks for its JRE in some path you give to it. Either some

5条回答
  •  半阙折子戏
    2020-12-02 11:11

    PowerShell syntax is as follows

    & 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe' -jar .\Executable.jar -Xmx256m
    

    Use a path to specific java.exe installed in your system.

提交回复
热议问题