openjdk installation

see if you have any java installled

java -version


sudo apt install openjdk-14-jdk
then you need to select which java to use, in case you have multiple installations on your system
sudo update-alternatives --config java
export JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
echo $PATH
to make it persistent after reboot, add the code to:
vim /etc/environment
source /etc/environment

Leave a Reply

Your email address will not be published. Required fields are marked *