Here is an example of how the result looks like. I believe it shouldn't be like that.
user@user:~$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64/bin/java:/usr/lib/jvm/java-11-openjdk-amd64/bin/java
It also influences maven commands, since I get the following error when running any of maven command:
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