![]() ![]() How to Install Java 8 on Debian GNU/Linux 9 (Stretch).Sample Output /usr/lib/jvm/java-8-oracle/jre/bin/java To verify that all went well run the following command. Reload by running the source command: $ source /etc/environment Press 'CTRL + O' to Save and CTRL + X' to exit nano editor. To do so, Open /etc/environment $ nano /etc/environmentĪdd the path to your preferred java installation JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java " How to set up the JAVA_HOME environment variable Scroll using the cursor keys and Press Enter on your preferred java installation.įinally, we need to set the JAVA_HOME environment variable. Press to keep the current choice, or type selection number: Sample Output There are 2 choices for the alternative java (providing /usr/bin/java).Ġ /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto modeġ /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual modeĢ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode To achieve this, e have to run the command below $ update-alternatives -config java $ java -version How to manage JavaĪs seen above we have a few Java installation in our system, and as good practice, It's advisable to set the default Java version. To verify that we have Java installed and check out the version, run the command below. To install default JDK, run $ apt-get install default-jdk Checking Java version At the time of writing, the default JDK installs Java OpenJDK 11 version. The default-jdk package comes with JRE, so there's no need to install JRE once you've installed JDK. This is commonly used with IDE's such as Eclipse and Netbeans for compiling Java programs. On the other hand, there exists a default Java installation popularly known as JDK, short for Java Development Kit. Next, Install Java Runtime Environment $ apt-get install default-jre ![]() #Install openjdk 11 ubuntu 18.04 update#Log in as root user and run the command below $ apt update This will install OpenJDK 11 which is the recommended version.įirst off, let's update the system. This is the easiest option when installing Java since it comes packaged with the Ubuntu system. OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode) How to Install default JDK/JRE (Java 11) To install OpenJDK 8, run the following command: $ apt update The Oracle JDK License has changed for releases starting April 16, 2019, most commonly used PPA are DISCONTINUED.īy default Ubuntu 18.04 comes with Java 11. Java is an application that is a prerequisite in a wide range of software such as Tomcat Web server, Netbeans IDE, Glassfish server to mention just but a few. ![]() By default, Ubuntu 18.04 comes with Java 11. In this tutorial, we'll focus on how to install Java 8 on Ubuntu 18.04 from the terminal. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |