How to use a different JRE (follow up)

This is a follow-up to SonarLint for IntelliJ: How to use a different JRE, which is an old topic today. Please, read it for context.

The “choose JRE” feature has been added to the Eclipse plugin but not to IntelliJ.
It would be great to be able to choose the JRE in IntelliJ too. Without this feature, the plugin is unusable in my situation.

If I can be of any help, please let me know.

1 Like

Hi Elvy,
Thank you for drawing our attention to this again. We indeed still have this issue under our radar but it hasn’t been prioritized yet due to a low number of complaints. I will keep you updated as soon as we can tackle it.

Please, tackle it as soon as possible.

Whenever you do, I could fly to wherever you are to offer you a coffee. You can’t imagine how a pain-in-the-*** this is to me on a daily basis :smile:

thx

2 Likes

Hey @Pigelvy, I HAD to do it since you mentioned the coffee.

Jokes aside, we will introduce a new system property in the next release to let you use the JRE you want for SonarLint. I will get back to you with more information, which will be documented in our official documentation section.

1 Like

Praise The Sun! :raised_hands:

Merci

Hey @Pigelvy, we have just released SonarLint 10.12. You should be able to provide a custom JRE by passing the following system property: sonarlint.jre.path

It is similar to the JAVA_HOME environment variable. To pass JVM options, follow the JetBrains documentation. Also, please provide a JRE that is at least Java 17.

Let us know about the result, thank you!

1 Like

I managed to make it work. Thanks.

A couple of ideas if I may:

  • Having the JRE path configurable directly from the SonarLint settings would increase its visibility and make it “more explicite” (kind of)
  • I could not find any documentation on Documentation - SonarLint for IntelliJ. Maybe the site has not yet been updated.

Anyway, to me, this is a great little addition! :+1:

2 Likes

Thanks for the feedback!

Having the JRE path configurable directly from the SonarLint settings would increase its visibility and make it “more explicite” (kind of)

Since you are the only user who reported this issue, we didn’t want to put something intrusive in the settings. We believe that using the embedded JRE from the IDE is normal behavior; in your case, it’s a rare exception. Eclipse has a dedicated UI for this because of the nature of the IDE—many companies tend to build their own IDE on top of Eclipse with many restrictions, which leads to complicated use cases.

I could not find any documentation on Documentation - SonarLint for IntelliJ. Maybe the site has not yet been updated.

You are right, the documentation will be soon updated. I just wanted to quickly notify you about this :smile:

Lastly, if you enjoy SonarLint for IntelliJ, do not hesitate to leave a review on our marketplace page, it’s always appreciated :sonarlint:

1 Like

Now that I have my own unique-feature-just-for-me, I feel really special :smiling_face_with_three_hearts:
You made my day!

Ok for the non-intrusiveness of this uncommon setting. The clear documentation you are about to add will hopefully help future-mes.

Feedback added to the marketplace.
Thank you very much.

3 Likes