Skip to content

Commit d11029f

Browse files
author
Patrick Boisen
committed
Use JDK 17 for SonarQube scanning
This is to get rid of the following error: Calling the SonarScanner CLI... dotnet.exe : Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main At C:\projects\dotnet-version-cli\Build.ps1:83 char:12 + exec { & dotnet sonarscanner end /d:sonar.login="$env:SONARCLOUD_ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Error: LinkageE...canner.cli.Main:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
1 parent c7e3a2a commit d11029f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Exec
2424

2525
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
2626

27-
$Env:JAVA_HOME="C:\Program Files\Java\jdk16"
27+
$Env:JAVA_HOME="C:\Program Files\Java\jdk17"
2828
$Env:PATH=-join($Env:JAVA_HOME, ";", $Env:PATH)
2929

3030
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];

0 commit comments

Comments
 (0)