We have heard of Java and perhaps we relate it to a functionality that allows us to reproduce content and although this is partly true, Java is much more than this, Java allows creating thousands of applications (with those that exist today) being compatible with virtually all modern operating systems..
Oracle has developed JDK "Java Development Kit - Java Development Kit" to be a set of tools, documentation and other vital utilities for the development of Java applications, in this way, JDK is integrated by different components such as:
JDK components
- A runtime interpreter (JRE)
JDK Features
Each of these needs the other to work and that the applications work as they should be. Java is currently in version 16 which offers us features such as:
- Additional Java APIs for Java application development, debugging, and monitoring
- An API has been introduced to offer access to native code in pure Java and of static type
- End users are now allowed to select the encapsulation type
- External memory access API
- Warnings for value-based classes
- The default method for compatibility with the default proxy method is InvocationHandler :: invoke
- Support for Unix domain sockets
- Day period support added to java.time formats
- Stream.toList () method was added
- Improved CompileCommand flag
- JAR support signed for RSASSA-PSS and EdDSA
- SUN, SunRsaSign and SunEC providers now support SHA-3 based signature algorithms
- -Trustcacerts and -keystore options added to keytool -printcert and -printcrl commands
- SunPKCS11 provider supports SHA-3 related algorithms
- Encoding of TLS Application Layer Protocol (ALPN) negotiation values has been improved
- TLS support for EdDSA signature algorithm
Without further ado, let's see how to install the latest version of Java in Ubuntu 21.10.
To stay up to date, remember to subscribe to our YouTube channel! SUBSCRIBE
Install Java on Ubuntu 21.10
Step 1
We open the terminal in Ubuntu 21.10 and we are going to validate that Java is not installed, for this we execute the command:
java -version
Step 2
As we can see, Java is not currently installed on the system, for this we will go to the URL of the official Java downloads in the following link:
Java
Step 3
There we click on the line "JDK Download" and then we must download the version of Java JDK for Linux:
Note
We must download the .deb file, clicking on it will open the following pop-up window:
Step 4
We activate the box to accept the terms and click on the Download button, we will save this file locally:
Step 5
We wait for the download to finish:
Step 6
Once it is downloaded, we go back to the terminal and there we access the Downloads folder using the cd command and we list the content with "ls" to see the Java JDK download:
Step 7
Now we are going to install Java with the command:
sudo dpkg -i .deb file
Step 8
We enter the password to complete the installation:
Step 9
At the end we will see that Java has been installed in Ubuntu 21.10:
Step 10
After this operation, we are going to execute the following:
sudo update-alternatives --install / usr / bin / java java /usr/lib/jvm/jdk-16.0.1/bin/java 1
Step 11
This allows you to update the links to the installed Java version:
Step 12
To know the exact version we must execute "ls / usr / lib / jvm":
Step 13
After this we will run. This last command updated what related to javac.
sudo update-alternatives --install / usr / bin / javac javas /usr/lib/jvm/jdk-16.0.1/bin/javac 1
Step 14
We validate the Java version:
java -version
Step 15
We validate the version of the Javac compiler:
javac -version
These are the steps to install Java on Ubuntu 21.10 and enjoy its features..