I installed java using the
Using terminal when I navigated to
sudo apt install openjdk-17-headless-jdk
but for some reason my intellij IDEA community edition couldn't find the jdk when I tried to create a maven project.
Since it was an emergency I selected the download jdk option and downloaded the
Oracle open jdk-17.0.1
version.
I would like to know if this would cause any issues in the future or not.
Since I selected 17.0.1 from the intellij options so I already know the version. But when I typed java --version
it gave me:
➜ ~ java --version
openjdk 17 2021-09-14
OpenJDK Runtime Environment (build 17+35-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 17+35-Ubuntu-1, mixed mode, sharing)
**Note:** Even before installing Intellij I checked if java installed correctly. It was working perfectly fine.
I also tried:
➜ ~ whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
But unfortunately when I tried to locate the jdk in intellij and navigated to the /usr/bin
I only saw a lots of x11
marked folder.

/usr/bin
I couldn't find the /java
folder.
**N.B:** I'm logged in as root if that information is needed
I would like to know if there is anything I can do to check the different sdks and what can I do to clear up the situation.
Asked by user458847
Nov 14, 2021, 09:35 PM