![]() Java SDK Compiler Version: javac -version ![]() Since references are directly symlinked to your path, you should immediately have the ability to check to see if your update-alternatives commands worked. Sudo update-alternatives -install /usr/bin/javaws javaws /usr/lib/jvm-oracle/jdk1.8.0_172/bin/javaws 1 Sudo update-alternatives -install /usr/bin/javac javac /usr/lib/jvm-oracle/jdk1.8.0_172/bin/javac 1 Sudo update-alternatives -install /usr/bin/java java /usr/lib/jvm-oracle/jdk1.8.0_172/bin/java 1 NOTE: Be sure to paste them into a text editor before pasting to the command line. Here are mine, double check the jdk directory name before using them. I like to prepare the next three command lines in a text editor so I can just copy/paste them into the command line and hit enter. Get the path to this directory and copy/paste it into gedit or your favorite text editor. This directory (bin) contains all of the executables you will need to reference for updating your alternatives. If it doesn’t, type a little more of it and try hitting tab again. Tip: if you type a part of the directory name and hit the tab key, it should auto complete. Move into your dir and the bin folder with cd and list out the contents. You should see a directory like ‘jdk1.8.0_172’ which is mine at the time of this article. List out the directory contents and find your extracted folder: ls -al Move into the /usr/lib/jvm-oracle and extract your tarball:Įxtract: sudo tar -xvzf (name of tarball) You will need to use the sudo command as this directory is at root level: sudo mkdir /usr/lib/jvm-oracleĬopy your tarball over: sudo cp ~/Downloads/(name of your tarball) /usr/lib/jvm-oracle But stay with me here.Ĭreate a directory at /usr/lib called jvm-oracle. The subtitle for this section can be deceiving if you are not familiar with how symlinks or references work. Step #2: Move tarball to Installation Reference Location. If you are running RHEL (Redhat Enterprise Linux), CentOS or Fedora, you should download the rpm and be aware that these instructions won’t work for you at the point of updating the alternatives. I chose to download 8u172, Linux 圆4, the one ending in. If in the case it no longer works, visit google and search for ‘Java SE Development Kit 8 Downloads’. ![]() This link may or may not work by the time you are reading this. Step #1: Download the Java 8 SDK from Oracle.īecause of the speed at which technology changes and Java is headed toward version 10, I am hesitant to share links. All of that being said, please post questions/comments if you encounter issues. This is meant to be a guide, I take zero responsibilty for any problems you may encounter while performing the next few steps. This is my own opinionated approach and it works. I understand that there is an apt package that I can add and do it that way but it is not owned, maintained or controlled by Oracle. This post is to document how I did this for future reference, but will hopefully be useful to other people solving the same problem. I couldn’t remember exactly what I did last time but knew that I needed to download the tarball from Oracle, save the extracted files somewhere, add the runtime (java), SDK compiler (javac) and webstart (javaws) executables to the ubuntu alternatives list and add a JAVA_HOME refererence for other tools like Gradle. I recently upgraded to the latest LTS version on my dev machine and needed to install Java. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |