Where did I set my JAVA_HOME on my Linux?
Hello guys,I use Linux Mint and need to use my maven with openjdk11, but it seems like it is configured to use jdk8 in some way and I can frankly not figure out how I did it.
Please look at this output:
fredrik@linuxTwo:~$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
fredrik@linuxTwo:~$ mvn -version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /opt/java/jdk1.8.0_181/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-20-generic", arch: "amd64", family: "unix"
fredrik@linuxTwo:~$ echo $JAVA_HOME
/opt/java/jdk1.8.0_181
fredrik@linuxTwo:~$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
fredrik@linuxTwo:~$ sudo update-alternatives --config java
[sudo] password for fredrik:
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
1 /opt/java/jdk-10.0.2/bin/java 1 manual mode
2 /opt/java/jdk1.8.0_181/bin/java 1 manual mode
* 3 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
Press <enter> to keep the current choice
Is there any other place that I might have set my system to use jdk8?
Best regards
Fredrik