SonarQube for IDE - Java issue with browser based VSCode

Hi Community

We are experiencing an issue with the SonarQube for IDE in SAP Business Application Studio (BAS), which is a browser-based VS Code environment. Some users receive the error “Java 17 or more recent is required to run”, even though during debugging we confirmed that Java 21 is available in the BAS environment.

We would like to understand how the extension detects and selects the Java runtime in remote or browser-based VS Code environments, and whether there are any known compatibility issues with SAP BAS. We would also appreciate guidance on what logs, settings, or environment variables to inspect, and whether it is possible to explicitly configure the Java path used by the extension in this type of environment.

Hi,

Welcome to the community!

What version of SonarQube for VS Code is in play here?

Also, how are you providing Java to BAS?

 
Ann

We are using SonarQube for IDE (VS Code extension) version 4.45.0.

Setup details:

  • SonarQube server: Internal Corporate SonarQube Community instance

  • Extension works correctly in Visual Studio Code (desktop) and successfully connects to the server in connected mode

Issue is specific to SAP Business Application Studio (BAS), which is a browser-based VS Code environment. for BAS JAVA environment is maintained by SAP additionally we installed it on system where we are using BAS in browser.

Is SonarQube officially supported in browser-based environments like SAP BAS?

Regards,

Bhagya

Hi Bhagya,

Welcome to the community and thanks for these details.

I’m not sure it is.

When you asked SAP about the version of Java they’re making available to the IDE, what did they say?

 
Thx,
Ann

Hi again,

To follow up, the IDE is supported. It would still be good to know what SAP said.

 
Thx,
Ann

1 Like

Hi there @vodorok ! :waving_hand:

Yes, SAP BAS is supported and with a bit of configuration it should work :smiley: Since you mentioned Java 21 is available in the BAS environment, can you try pointing SonarQube for IDE to it? You will need to set sonarlint.ls.javaHome setting.

Let me know how it goes.

All the best,
Sophio

could you please help like how to set this setting? is there any Cli command which can be used in BAS?

Regards,

Bhagya

I don’t have access to BAS but the flow is Settings > Extensions > SonarLint > sonarlint.ls.javaHome



Alternatively, you can find the location of BAS user settings file (JSON), and add an entry there. You can do this by running Preferences: Open User Settings (JSON) command.

Example value:
{ "sonarlint.ls.javaHome": "/usr/lib/jvm/java-21-openjdk-amd64" }

I hope this helps,
Sophio

1 Like