document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. OpenJDK Java 8 has been made into official Ubuntu repositories for 14.10 Utopic and higher. For Ubuntu 14.04, Ubuntu 12.04, and Linux Mint 17 users here’s how to install it from PPA.
  2.  
  3. As a workaround, you can install OpenJDK 8 from a PPA repository:
  4.  
  5. 1. Open terminal from the Dash or by pressing Ctrl+Alt+T. When it opens, run the command below to add PPA:
  6.  
  7. sudo add-apt-repository ppa:openjdk-r/ppa
  8.  
  9. 2. After that, update system package cache and install OpenJDK 8:
  10.  
  11. sudo apt-get update
  12.  
  13. sudo apt-get install openjdk-8-jdk
  14.  
  15. 3. If you have more than one Java versions installed on your system. Run below command set the default Java:
  16.  
  17. sudo update-alternatives --config java
  18.  
  19. Type in a number to select a Java version.
  20.  
  21.  
  22. Then set default Java Compiler by running:
  23.  
  24. sudo update-alternatives --config javac
  25.  
  26. 4. Finally check out current Java version by running:
  27.  
  28. java -version
  29.  
  30. It outputs something like this:
  31.  
  32. openjdk version "1.8.0_40-internal"
  33. OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
  34. OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)
');