![]() To verify if the JDK is installed properly, we will check the version of javac, which is the Java compiler. OpenJDK 64-Bit Server VM (build 17+35-Ubuntu-120.04, mixed mode, sharing) OpenJDK Runtime Environment (build 17+35-Ubuntu-120.04) ![]() ![]() If everything works fine, you should get an output similar to the one shown below. Once the installation is completed, run the following command in order to check if it works properly. sudo apt install openjdk-17-jdk openjdk-17-jre -y We will install both JDK and JRE in order to run Java applications and applets. Run the following command to install Java 17 on Ubuntu 20.04. Msopenjdk-17 - OpenJDK Development Kit 17 (JDK) with Hotspot by Microsoft Openjdk-17-source - OpenJDK Development Kit (JDK) source files Openjdk-17-jre-zero - Alternative JVM for OpenJDK, using Zero Openjdk-17-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless) Openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT Openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless) Openjdk-17-jdk - OpenJDK Development Kit (JDK) Openjdk-17-doc - OpenJDK Development Kit (JDK) documentation Openjdk-17-demo - Java runtime based on OpenJDK (demos and examples) Openjdk-17-dbg - Java runtime based on OpenJDK (debugging symbols) You can search java using this command: $ sudo apt-cache search openjdk | grep 17 This is the easiest way to install the JDK using the apt package manage. Ubuntu 20.04’s default repository included Java 17. If java is installed, that command will print out the java version If you see java: command not found then it means that java is not installed. Sudo apt install openjdk-17-jre-headless # version 17+35-1~20.04 Sudo apt install openjdk-13-jre-headless # version 13.0.7+5-0ubuntu1~20.04 Sudo apt install openjdk-8-jre-headless # version 8u292-b10-0ubuntu1~20.04 Sudo apt install default-jre # version 2:1.11-72 $ java -versionĬommand 'java' not found, but can be installed with: I use vim text editor, please make sure its installed using this command: sudo apt install -y vim Installing JavaĬheck whether java is installed in your sytem. Let us also install some common packages that we might need. If there are packages to upgrade, the above comand may take a couple of minutes. Use these commads to achieve the goal: sudo apt update
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |