anchor.diff:  # Installing Oracle JDK
  +:hp-tags: java, ubuntu
   
   The Oracle JDK is the official JDK; however, it is no longer provided by Oracle as a default installation for Ubuntu. 
   
   You can still install it using apt-get. To install any version, first execute the following commands:
   
  -
  +[source,bash]
  +----
   sudo apt-get install python-software-properties
   sudo add-apt-repository ppa:webupd8team/java
   sudo apt-get update
  +sudo apt-get install oracle-java8-installer
  +----
   
  -
  -## Oracle JDK 8
  -
  -This is a developer preview, the general release is scheduled for March 2014. This external article about Java 8 may help you to understand what it's all about.
  -
  -sudo apt-get install oracle-java8-installer
  -
  -Managing Java (optional)
  +## Managing Java (optional)
   
   When there are multiple Java installations on your Droplet, the Java version to use as default can be chosen. To do this, execute the following command:
   
  +[source,bash]
  +----
   sudo update-alternatives --config java
  +----
   
   It will usually return something like this if you have 2 installations (if you have more, it will of course return more):
   
   There are 2 choices for the alternative java (providing /usr/bin/java).
   
  +
  +[source,bash]
  +----
   Selection    Path                                            Priority   Status
   ------------------------------------------------------------
   * 0            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      auto mode
  
positive.code: 
  Copy the path from your preferred installation and then edit the file /etc/environment:
  
  sudo nano /etc/environment
  
  In this file, add the following line (replacing YOUR_PATH by the just copied path):
  
  JAVA_HOME="YOUR_PATH"
  
  That should be enough to set the environment variable. Now reload this file:
  
  source /etc/environment
  
  Test it by executing:
  
  echo $JAVA_HOME
  
  If it returns the just set path, the environment variable has been set successfully. If it doesn't, please make sure you followed all steps correctly.
  
  
negative.code:   2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode
  
  Press enter to keep the current choice[*], or type selection number:
  ----
  
  
  You can now choose the number to use as default. This can also be done for the Java compiler (javac):
  
  [source,bash]
  ----
  sudo update-alternatives --config javac
  ----
  
  It is the same selection screen as the previous command and should be used in the same way. This command can be executed for all other commands which have different installations. In Java, this includes but is not limited to: keytool, javadoc and jarsigner.
  Setting the "JAVA_HOME" environment variable
  