sonnar cloud issue
Hello. I`m geting this error om my pr check project. How do i update java in this context? Thanks.
INFO: ------------------------------------------------------------------------
The version of Java (1.8.0_221) you have used to run this analysis is deprecated and we stopped accepting it.
Please update to at least Java 11. You can find more information here: https://sonarcloud.io/documentation/upcoming/
ERROR:
The SonarScanner did not complete successfully
17:39:12.458 Post-processing failed. Exit code: 1
Command exited with code 1
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 21 Feb, 2021 08:49 PM
Hi Raffaelllo,
All JDKs are in “C:\Program Files\Java\jdk{version}” directory, so you can do, for example, this to enable JDK 15:
2 Posted by Raffa Cabo Frio on 21 Feb, 2021 09:21 PM
Thanks. It worked!
3 Posted by Mario Toffia on 25 Feb, 2021 08:55 AM
Hi Feodor,
I've tried to do your solution above and can see that it executes it (in the build log)
But it still complaints about the JDK (I'm using image "Visual Studio 2019") - what have I done wrong?
Cheers,
Mario :)
Support Staff 4 Posted by Feodor Fitsner on 25 Feb, 2021 02:31 PM
Could you drop a link to the build please?
5 Posted by Mario Toffia on 25 Feb, 2021 02:43 PM
Hi and thanks for the prompt reply! :) - Absolutely, here it is:
current build - it builds my open source project FluentDocker on github.
Cheers,
Mario :)
Support Staff 6 Posted by Feodor Fitsner on 25 Feb, 2021 08:42 PM
Try adding
where java
andjava --version
before running sonnarcloud command?7 Posted by Mario Toffia on 26 Feb, 2021 09:38 AM
Hi Feodor,
It outputs that it has Open JDK 15...
I don't understand this...
Here's my appveyor file:
8 Posted by Mario Toffia on 26 Feb, 2021 10:47 AM
Hi again, moved the commands to the sonar "end" command and got the following:
it is the
failing with:
Cheers,
Mario
Support Staff 9 Posted by Feodor Fitsner on 26 Feb, 2021 09:31 PM
Could it be sonar scanner is searching for JDK in machine-wide PATH variable. You can try changing it and remove path to JDK 8, something like:
10 Posted by Mario Toffia on 01 Mar, 2021 08:51 AM
Hi, thanks for the suggestion and for all you help Feodor.
I've finally got it to work using this (if someone else stumbles into this problem).
Cheers,
Mario :)
Support Staff 11 Posted by Feodor Fitsner on 01 Mar, 2021 05:22 PM
Oh, I completely forgot about
JAVA_HOME
variable! Thank you for sharing the solution!Feodor Fitsner closed this discussion on 01 May, 2021 09:03 PM.