I installed the latest JDK 17, only to notice that my JHipster Version was not compatible with it. Naturally, I decided to delete the JDK. Unfortunately, after that Ubuntu did not seem to recognize my other installed Java Versions.
I ended up adding this to the end of my ~./bashrc:
#SETUP JAVA HOME
export JAVA_HOME="/usr/lib/jvm/java-1.11.0-openjdk-amd64"
export PATH=$PATH:$JAVA_HOME/bin
I can see the right version of the JDK when doing "java -version", but when I run my mvnw.sh JHipster build script, it says
Error: JAVA_HOME is not defined correctly.
Anything I did wrong? Starting the app with Intellij still works fine...