java 使用特定的 jdk 启动 SonarQube 服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27562943/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 12:00:23  来源:igfitidea点击:

start SonarQube server with specific jdk

javasonarqube

提问by user871611

Is there a way to start the SonarQube server (v. 3.7.4) with an specific jdk?

有没有办法用特定的 jdk 启动 SonarQube 服务器(v. 3.7.4)?

My case: My java-home is set to jdk 1.8, but SonarQube server has some known problems with 1.8. So I want to start the server with jdk 1.7 (without setting my java-home to 1.7). I couldn't find anything in the bat-files.

我的情况:我的 java-home 设置为 jdk 1.8,但 SonarQube 服务器在 1.8 上存在一些已知问题。所以我想用 jdk 1.7 启动服务器(不将我的 java-home 设置为 1.7)。我在 bat 文件中找不到任何内容。

OS: Windows 7; SonarQube server version: 3.7.4

操作系统:Windows 7;SonarQube 服务器版本:3.7.4

回答by Fabrice - SonarSource Team

You have to edit the <install_directory>/conf/wrapper.conffile and update the wrapper.java.commandproperty to point to the JDK you want.

您必须编辑<install_directory>/conf/wrapper.conf文件并更新wrapper.java.command属性以指向所需的 JDK。

Everything is documented in this wrapper.conffile.

一切都记录在这个wrapper.conf文件中。