Advertisement
Unimatrix36

Linux Ubuntu 18.04.2 LTS - Install OpenJDK

Jun 7th, 2019
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. Here's a video I made about the installation:
  2. https://www.youtube.com/watch?v=Ow40souEW1s
  3.  
  4. 1: sudo add-apt-repository ppa:openjdk-r/ppa
  5.  
  6. 2: sudo apt-get install openjdk-8-jdk
  7.  
  8. 3: sudo update-alternatives --config java
  9.  
  10.   On the left there are a couple of numbers.
  11.   Look at the number next to the row where it says "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java"
  12.   Type that number and press Enter
  13.  
  14. 4: sudo nano /etc/environment
  15.  
  16.   Add text below on a new row.
  17.  
  18.   JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java"
  19.  
  20.   Then save and exit. Ctrl + O and press Enter. Then Ctrl + X
  21.  
  22. 5: source /etc/environment
  23.  
  24. 6: echo $JAVA_HOME
  25.  
  26. 7: java -version
  27.  
  28. For Minecraft users:
  29. If the game doesn't start, try this:
  30.  
  31. Go to Launch Options
  32. Activate advanced settings at the top
  33. Click on the profile you want to edit
  34. Activate Java executable
  35. In the text box next to it, paste this in:
  36. /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement