Sat. Dec 7th, 2019

Host your Website

Read and learn

FatCow Web Hosting $1.00/mo* Trust your web hosting to the #1 web host provider, GoDaddy!

How to Install the JDK & JRE In Ubuntu (Java Programming Part 1)

1 min read



This is a tutorial on how to easily install the JDK and JRE in Ubuntu.
Commands to run (one at a time) :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

java -version
javac -version

21 thoughts on “How to Install the JDK & JRE In Ubuntu (Java Programming Part 1)

  1. To do all commands at once (You can do this for anything):
    sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer 

    (Just copy and paste)

  2. I've switch over to Arch Linux myself (quite awhile back) and have switched over to OpenJDK/OpenJRE, so I can't give you the exact location. However, I can TELL you where to find it. In your CLI (Bash or whatever), type "whereis java". The whereis program can help you locate the binary, source, and manual page files for a command.

  3. n designates a string to be printed on a new line and works on all operating systems. Say you are writing to the end of a file. If you want your code to be technically correct and formatted correctly for most/all OS's, use n. Otherwise, use the system specific "Enter". For example, if you write a .txt file by hand in Linux, when you open it in Windows, the formatting may be off. Use of n for a new line (formatting) will ensure it formats the same on all OS's, as well as works properly.

  4. The "automatic" captions created by Youtube were unreadable trash (it doesn't know what Java, JDK, JRE, Ubuntu, webup8 and even a lot of common words are). For those of you that will be using captions, enjoy.

Comments are closed.

Copyright © All rights reserved. | Newsphere by AF themes.