I broke maven... I wanted to change from 3.6.0 to 3.8.1 and nothing is working yet
wget https://downloads.apache.org/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-*.tar.gz -C /opt
ln -s /opt/apache-maven-3.8.1 /opt/maven
nano /etc/profile.d/maven.sh
chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh
mvn -version
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
maven.sh https://paste.gg/p/anonymous/270d92410d25446ba0d312175fb422e3
Something with adoptopenjdk and the java path, but idk I tested a lot
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
and update-alternatives says:
/usr/lib/jvm/adoptopenjdk-16-hotspot-amd64/bin/java
Debian 10