ldpsanchez Our docs indicate what is likely to work for Java applications not IDEs. Not everything in the universe reads JAVA_HOME to look for a JDK. Many things are hard-coded to look in specific paths or to use vendored JDKs, others like IntelliJ ignore JAVA_HOME entirely for project JDKs because they assume it will be configured incorrectly. You cannot rely on that always working.
If JAVA_HOME isn't working for your IDE of choice, then the thing to do would be to find out how to configure a specific JDK within a project for that IDE.
ldpsanchez I have read the other threads where other people mess with the general variables of the system, and you indicated that it is not correct to do that because in future updates it could corrupt the system
That depends entirely on what environment variables they are messing with. Generally speaking, setting JAVA_HOME is harmless on Solus because all of our packaged Java software is already configured to use a specific JDK. That's not to say that it won't affect other third party applications.