sonnar cloud issue

Raffaelllo's Avatar

Raffaelllo

20 Feb, 2021 05:48 PM

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

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Feb, 2021 08:49 PM

    Feodor Fitsner's Avatar

    Hi Raffaelllo,

    All JDKs are in “C:\Program Files\Java\jdk{version}” directory, so you can do, for example, this to enable JDK 15:

    init:
    - set PATH=C:\Program Files\Java\jdk15\bin;%PATH%
    
  2. 2 Posted by Raffa Cabo Frio on 21 Feb, 2021 09:21 PM

    Raffa Cabo Frio's Avatar

    Thanks. It worked!

  3. 3 Posted by Mario Toffia on 25 Feb, 2021 08:55 AM

    Mario Toffia's Avatar

    Hi Feodor,

    I've tried to do your solution above and can see that it executes it (in the build log)

    "Build started
    set PATH=C:\Program Files\Java\jdk15\bin;%PATH%
    ..."
    

    But it still complaints about the JDK (I'm using image "Visual Studio 2019") - what have I done wrong?

    "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"
    

    Cheers,
    Mario :)

  4. Support Staff 4 Posted by Feodor Fitsner on 25 Feb, 2021 02:31 PM

    Feodor Fitsner's Avatar

    Could you drop a link to the build please?

  5. 5 Posted by Mario Toffia on 25 Feb, 2021 02:43 PM

    Mario Toffia's Avatar

    Hi and thanks for the prompt reply! :) - Absolutely, here it is:
    current build - it builds my open source project FluentDocker on github.

    Cheers,
    Mario :)

  6. Support Staff 6 Posted by Feodor Fitsner on 25 Feb, 2021 08:42 PM

    Feodor Fitsner's Avatar

    Try adding where java and java --version before running sonnarcloud command?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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