How to install Java on Ubuntu with apt

preview_player
Показать описание
Want to install Java on Ubuntu in the fastest way possible? Just use Ubuntu apt to install Java with the default JDK, and the installation will go quickly and without issue.

The only drawback? You may not get the latest version of Java installed on Ubuntu. Right now, with Ubuntu 22, Java 11 is the default JDK installed with apt. That's a bit behind the times because Java 17 is the latest long term support (LTS) release.

But if you just need to run Java applications or compile some Java code, this is the best way to setup Java on Ubuntu. It's fast, it's easy, and you'll get Java installed on Ubuntu quickly and easily.
Рекомендации по теме
Комментарии
Автор

Searched so many videos and googled literally for 1 hour. But could not find the resolve until I found this vid. Thank you so much.

MaroofAhmed-ngod
Автор

This is great video. Worked like ice for me. Thank you.

venukumarkodari
Автор

Hi Cameron! You probably do not know how much you helped me today. I am a beginner on Linux, and I had to hard reset my Linux two times, because I was failing at Java installation. In the first hard reset I choose a easier Linux Distro. And your video helped me to install Java and set as $JAVA_HOME. Anyway, I wish that Jesus bless you and, thanks for helping us!

tiago
Автор

Great video but I believe that you're supposed to write the JAVA_HOME variable without the /bin/java part

Flome
Автор

The JAVA_HOME variable in the "/etc/environment" file should point to the directory containing the Java installation, not directly to the "java" executable.
Therefore, the correct configuration would be:

SinNombre
Автор

sorry may ask you a question. When i type sudo nano /etc/enviorment, it opens nano but there is no PATH and when i put JAVA_HOME and exeute echo JAVA_HOME, it displays command not found

boli
Автор

OMD THANK YOU I AM NEW TO UBUNTU AKA LINUX THANK YOU

Whimsickle_
join shbcf.ru