New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Setup JDK in Ubuntu
Steps:
1.Extract jdk to opt folder
command: sudo unzip jdk1.*.zip -d '/opt'
2.Edit your .bashrc file
command: gedit ~/.bashrc
3.Add the following lines at the end of .bashrc
export JAVA_HOME=/opt/jdk1.* PATH=.:$PATH:$JAVA_HOME/bin export PATH
4.Reload .bashrc and test version
command:source ~/.bashrc
command: java -version