java 17版本不支持sonarqube版本9.8.0?

问题描述 投票:0回答:1

我的系统中有java版本21和java 17。对于

sonarqube
,我拥有的版本是 9.8.0,但是在运行
sonarqube
应用程序时,我无法启动该应用程序。

日志文件中显示的错误是,

2024.01.14 10:31:36 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp
2024.01.14 10:31:36 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50127]
2024.01.14 10:31:37 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\elasticsearch]: C:\Program Files\Java\jdk-21\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djna.tmpdir=C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j2.formatMsgNoLookups=true -Djava.locale.providers=COMPAT -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\elasticsearch -Des.path.conf=C:\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2024.01.14 10:31:37 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.01.14 10:31:40 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2024.01.14 10:31:40 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.14 10:31:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

sonarqube java-17
1个回答
0
投票

SonarQube 9.8 支持(或者更确切地说,需要Java 17。如果您的计算机上安装了两个版本的 Java,请确保通过调用以下命令设置

SONAR_JAVA_PATH

setx SONAR_JAVA_PATH "C:\Program Files\java_home\bin\java.exe"

确保在上面的代码片段中调整路径以指向 Java 17。

© www.soinside.com 2019 - 2024. All rights reserved.