SonarQube: Version 7.4 (build 18908)
Client Machine: JDK 1.8.0_202
Eclipse: 2021-03R (Comes with OpenJDK 15.0.2)
The SonarLint will automatically validate the file during on-save, but it failed with errors and unable to highlights any sonar violation when using Eclipse 2021-03R default OpenJDK 15.0.2. It will work if used with Oracle JDK.
Edit the eclipse.ini file to change the -vm argument to point to the JDK
NOTE: Refer to Help #40989 for more info.
Steps to reproduce:
- Have SonarQube 7.4 Community Edition, Eclipse 2021-03R and SonarLint plugin
- Setup SonarLint connection to the SonarQube server
- Edit a Java class file in Eclipse and save it.
- SonarLint will lint the java code.
- SonaLint failed with error thrown.