AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() Alternatively, you can just use the Ubuntu repositories. Update 2019: Now that you need an account to download the file below, you’ll have to manually download the file and continue the process after the next step. Java 17 is only available for 64-bit systems, so if your Ubuntu is 32-bit, you must use a different version. Replace the version numbers if you’re going to use a different version. We’ll use Java’s Standard Edition 17 for the purpose of this tutorial. Go to Oracle’s downloads page and select the version you want to download. Update first: apt-get update & apt-get upgrade Step 2: Download the JDK If you want to install a custom version of Oracle’s JDK that’s not available via a package, you can follow the steps below. You won’t get updates from Ubuntu’s repositories, you’ll have to manually update your Java each time there’s a new release. This step is not recommended for beginners. How to install Java manually using Oracle’s JDK on Ubuntu ![]() ![]() So to install the JDK 8th, outdated version, run the following command: apt-get install oracle-java8-installer We’ll use the one from WebUpd8, but you can use any other repository: add-apt-repository ppa:webupd8team/javaĪnd then update your package list again: apt-get update Step 3: Install Java The first thing you need to do is add a 3-rd party repository to get the Oracle JDK. To install Java 8 (which will reach its end of life January 2019!), follow these instructions: Step 1: Update Ubuntu No longer recommended: How to install Java 8 using the Oracle JDK You can now move on to step 4 and configure your Java. The command is pretty similar for other versions too (if you want to install another version, replace the XX) apt-get install oracle-javaXX-installerĪnd that’s it. So to install the JDK 17th (LTS), latest version, run the following command: apt-get install oracle-java17-installer We’ll use the one from Linux Uprising, but you can use any other repository: add-apt-repository ppa:linuxuprising/javaĪnd then update your package list again: apt-get update Step 3: Install Java 17 Run the following commands: apt-get update & apt-get upgradeĪnd install the required package if you don’t have it already installed: apt-get install software-properties-common Step 2: Add the Java repository Step 1: Update UbuntuĪgain, you should always update your system first before you do anything else. If you don’t want to use Ubuntu’s default open source JDK, you can use the official Oracle JDK through a 3-rd party repository. How to install Java 17 using the Oracle JDK You can now move on to step 3 and configure your Java. Depending on when you’re reading this, the command will install Java 11 or a newer version. Run the following command: apt-get install default-jdkĪnd that’s it. You can do so by running the following commands: apt-get update & apt-get upgrade Step 2: Install the default JDK The first thing you should always do is update your system. This is the OpenJDK package which is an open source implementation of Java. By installing the JDK (Java Development Kit), you’ll also install the JRE (Java Runtime Environment). We’ll start with our instructions on how to install the latest recommended version of Java (JDK) using the Ubuntu package. How to install Java (the default JDK) on Ubuntu using apt-get Installing Java manually using Oracle’s JDK (not recommended for beginners).Installing Java 11 or Java 13 using Oracle’s JDK with apt-get.Installing the latest Java using the default (Ubuntu’s) JDK using apt-get (use this if you don’t know what to choose).Contact us and we’ll install and configure Java for you (any version, any OS).We’ll order them based on difficulty (easiest first): There are multiple ways of installing Java If you do, remove it, or if you want to use multiple Java versions/installs, then keep it and configure them later. Make sure you don’t have Java already installed.An SSH client like MobaXterm (if you use Windows), or SSH enabled (if you use Ubuntu).If you’re using a non-root user then you’ll need to append ‘sudo’ to most commands. All commands below are executed by the root user. You can get one from Vultr or any other cloud hosting provider Some things you’ll need before we start installing Java: In a hurry? Click here and follow the instructions. They should work on both servers and desktops. This should work for any Ubuntu-based distro, even non-LTS versions like 20.10, but they were tested on Ubuntu 18.04 and Ubuntu 20.04. These instructions will work for Ubuntu 16.04, 18.04, Ubuntu 20.04, and any other LTS release, or even other Ubuntu-based distros like Xubuntu. It’s a pretty straightforward and easy process, and we’ll show you step-by-step instructions on how to install Java on Ubuntu. ![]()
0 Comments
Read More
Leave a Reply. |