SDK settings

Answered

Hi, I`m trying to find the JDK installed in /usr/lib/jvm.

But, the intellij can`t find that folder. It sugest install the last version of JDK. Right, I installed, but now when i try to execute the .jar it happens a conflict, because the JDK used by Intellij is jdk 19.0.2

The JDK 19.0.1 is installed in /user/lib/jvm (pictures)

The JDK installed by Intellij is in ~/.jdk (pictures)

Hidden files are enable.

0
4 comments

IDE does not change your terminal settings.

The problem is that you have an older default Java in the terminal than was used to compile the classes.

It's not related to IntelliJ IDEA.

Run `java -version` (instead of `javac -version`) to see what Java version is default in the terminal.

Then change your PATH to make a new version the default one. Or change your project target level to build classes compatible with the older JDK versions.

0

Hi Serge. Thank you so much.

I changed to openJDK and it work!

But my question is, why Intellij did´t show the jdk directory /usr/lib/jdk?

Thanks Serge!

0

Probably you don't have permissions to access this directory from IntelliJ IDEA. If you installed IDE via snap/flatpack/other package manager, it can limit IDE access to system folders.

0

Yes. I installed by snap store. I will install through terminal, or change the permissions.

Thanks a lot Serge, have a good day.

0

Please sign in to leave a comment.