问题描述
我已下载 SonarQube(7.9.x LTS(2019 年 7 月)).
I have downloaded SonarQube (7.9.x LTS (July 2019)).
我在 64 位 Windows 机器上有 java 版本1.8.0_221".环境变量JAVA_HOME设置为C:Program FilesJavajdk1.8.0_221,路径:C:Program FilesJavajdk1.8.0_221in &C:Program FilesJavajre1.8.0_221in.
I have java version "1.8.0_221" in 64bit windows machine.Environment variable JAVA_HOME is set to C:Program FilesJavajdk1.8.0_221, path: C:Program FilesJavajdk1.8.0_221in & C:Program FilesJavajre1.8.0_221in.
我在运行 StartSonar.bat 时遇到以下错误
I encountered following error while running StartSonar.bat
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run
jvm 1 | java.lang.IllegalStateException: SonarQube requires Java 11+ to run
jvm 1 | at org.sonar.application.App.checkJavaVersion(App.java:93)
jvm 1 | at org.sonar.application.App.start(App.java:56)
jvm 1 | at org.sonar.application.App.main(App.java:98)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:748)
wrapper | <-- Wrapper Stopped
Press any key to continue . . .
我已尝试实施在各种博客中找到的解决方案,但仍然没有运气.我尝试在命令中更改 wrapper.conf 文件
I have tried to implement solutions that I found in various blogs,but still no luck.I tried by making changes in wrapper.conf file at command
wrapper.java.command=java
wrapper.java.command=java
或
wrapper.java.command=C:Program FilesJavajdk1.8.0_221injava
wrapper.java.command=C:Program FilesJavajdk1.8.0_221injava
还有
wrapper.java.command=C:Program FilesJavajdk1.8.0_221injava
wrapper.java.command=C:Program FilesJavajdk1.8.0_221injava
请针对此问题提出解决方案.注意:我在没有管理员权限的情况下运行 StartSonar.bat 不知道有没有影响.
Please suggest solution for this issue.Note: I am running StartSonar.bat without admin permission don't know if it has any impact.
推荐答案
安装 JDK 版本 11(从 https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html).如果下载链接失效,请谷歌JDK 11 下载".
Install JDK version 11 (download from https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html). If the download link not working, google "JDK 11 download".
并更改 <sonar>confwrapper.conf
中以下行的值:
and change the value for the line below in <sonar>confwrapper.conf
:
wrapper.java.command=C:Program FilesJavajdk-11.0.6injava
这篇关于“SonarQube 需要 Java 11+ 才能运行"对于 java 1.8.0_221的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!