WebStorm 2021.2 Help

Change the boot Java runtime of the IDE更改IDE的启动Java运行时

As a Java application, WebStorm includes JetBrains Runtime (based on OpenJDK 11), which is used by default. 作为一个Java应用程序,WebStorm包含JetBrains运行时(基于OpenJDK 11),默认情况下使用。It is recommended to run WebStorm using JetBrains Runtime, which fixes various known OpenJDK and Oracle JDK bugs, and provides better performance and stability. 建议使用JetBrains运行时运行WebStorm,它修复了各种已知的OpenJDK和Oracle JDK错误,并提供了更好的性能和稳定性。However, in some cases you may be required to use another Java runtime or a specific version of JetBrains Runtime.但是,在某些情况下,您可能需要使用另一个Java运行时或JetBrains运行时的特定版本。

Switch the Java runtime used to run WebStorm切换用于运行WebStorm的Java运行时

  1. From the main menu, select Help | Find Action or press Ctrl+Shift+A.从主菜单中,选择“帮助”|“查找操作”或按Ctrl+Shift+A

  2. Find and select the Choose Boot Java Runtime for the IDE action.查找并选择选择IDE启动的Java运行时操作。

  3. Select the desired runtime and click OK.选择所需的运行时并单击“确定”。

    If necessary, you can change the location where WebStorm will download the selected runtime.如有必要,您可以更改WebStorm下载所选运行时的位置。

  4. Wait for WebStorm to restart with the new runtime.等待WebStorm使用新运行时重新启动。

When you open the Choose Boot Runtime for the IDE dialog for the first time, it may take a while to load the list of JetBrains Runtime builds from the server.首次打开“为IDE选择启动运行时”对话框时,可能需要一段时间才能从服务器加载JetBrains运行时生成列表。

To use a different Java runtime available on your computer, select Add Custom Runtime under Advanced. 要使用计算机上可用的其他Java运行时,请选择“高级”下的“添加自定义运行时”。WebStorm lists all the JDKs and JREs that it was able to detect. WebStorm列出了它能够检测到的所有JDK和JRE。Alternatively, click Add JDK to specify the location of the desired Java home directory.或者,单击“添加JDK”以指定所需Java主目录的位置。

To reset back to the default runtime that the IDE initially used, click Use Default Runtime.要重置回IDE最初使用的默认运行时,请单击“使用默认运行时”。

The path to the selected runtime is stored in the webstorm.jdk or webstorm64.jdk file in the WebStorm configuration directory. 所选运行时的路径存储在webstorm配置目录中的webstorm.jdkwebstorm64.jdk文件中。If there are problems with the selected runtime, you can delete this file to revert to the default runtime.如果所选运行时存在问题,则可以删除此文件以还原为默认运行时。

You can also override the runtime used for WebStorm by adding the WEBIDE_JDK/ WEBIDE_JDK_64 environment variable with the path to the desired JDK home directory.您还可以通过添加带有所需JDK主目录路径的WEBIDE_JDK/WEBIDE_JDK_64环境变量来覆盖用于WebStorm的运行时。

Last modified: 23 April 2021