问题
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
sonaruser 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