I want to play Java games on my Ubuntu 16.04 LTS Laptop. I have looked at many tutorials across the web and keep getting confused and hitting error messages. Please help. (Former Windows User)
3 Answers
You can install java from the commandline with:
$ sudo apt install openjdk-8-jdk
You can get to a terminal commandline by hitting this keyboard shortcut: Alt+Ctrl+T
The $ you see in the commanline is the prompt you see when your enter the terminal mode. Type in the text the follows and press ENTER.
- 25,444
If you would like to use Oracle's Java, you can install it with a PPA. First open a terminal by using Ctrl+Alt+T and run the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
The first command adds the PPA so you are able to download Java. The second command 'refreshes' or 're-syncs' the avaliable packages. The last one installs Oracle's Java, version 8.
After it has installed, you can check by running:
java -version
- 5,323
- 71
I prefer to install Oracle's Java. Here are the steps:
Open a terminal with CTRL + ALT + T, or just type terminal in dash.
Then start typing . . .
1) First add the PPA
sudo add-apt-repository ppa:webupd8team/java
2) Update your repositories
sudo apt-get update
3) Install Java version of your preference
sudo apt install oracle-java8-installer
If you prefer to install another Java version, just change "8" to your desired version, for example, if you want to install Java 6 just type this: sudo apt install oracle-java6-installer
4) Mark Java version as default (if you installed Java 8)
sudo apt install oracle-java8-set-default
In this link you can find more information about: http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/