How to install SonarQube with Open JDK 11

一曲冷凌霜 提交于 2021-01-28 07:44:20

问题


I am trying to install SonarQube 8.5 (community version) on my local machine . My machine already has Java JRE 8 installed. SonaQube has pre-requirement JRE 11 or Open JDK 11. Since you cannot download JRE 11 anymore, I decided to go with Open JDK 11

I want to set SonarQube to use specific JDK. How do i do that?

Quick SO search suggest to use wrapper.java.command in wrapper.conf file, but this line is not available

SonarQube 8.5, OS Windows: 10


回答1:


If you want your sonarqube to use specific JDK i.e. in your case OpenJDK 11, rather than use JRE 8. You can create a user say sonar.

Give sonar user the ownership of all the installations of sonarqube. Set the path of JAVA_HOME for OpenJDK11 for the usersonar only.

Note: You have to start sonarqube using sonar user only.

Then , you can set SonarQube to use specific JDK




回答2:


actually i found it These doesn't exist by default, so I need to add these two lines into wrapper.conf

wrapper.java.command=C:\SonarQube\openjdk-11.0.2-win64\jdk-11.0.2\bin
wrapper.java.command=C:\SonarQube\openjdk-11.0.2-win64\jdk-11.0.2\bin\Java

Your installation base path may be different. But bin and bin\Java is important



来源:https://stackoverflow.com/questions/64493276/how-to-install-sonarqube-with-open-jdk-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!