After reading various tutorials and messing with a bunch of fixes I've found a way that works perfectly.
First of all download JDK 8 from Oracle and execute the following lines in the terminal:
cd Downloads
tar -xvf jdk-8u25-linux-x64.tar.gz
rm jdk-8u25-linux-x64.tar.gz
sudo mkdir -p /usr/lib/jvm/
sudo mv jdk1.8.0_25 /usr/lib/jvm/
Now download the JDK font fix (Courtesy of Urshulyak Yaroslav) by executing the following:
cd ~/Downloads
wget http://urshulyak.com/jdk-8u5-tuxjdk-b08.tar.gz
tar -xvf jdk-8u5-tuxjdk-b08.tar.gz
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib/jvm
rm jdk-8u5-tuxjdk-b08.tar.gz
This will extract the downloaded zip and move it to /usr/lib/jvm/. Now run the following in the terminal:
cd ~
sudo gedit .bashrc
Then add the following lines to the very bottom of the bashrc file.
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_25/
export JAVA_HOME
Save it then gedit the idea.sh. (Your script location may be different)
gedit /home/USER/Downloads/idea/bin/idea.sh
At the very bottom of the script replace the line(s) in the While Do statement at the bottom with these two lines:
eval "/usr/lib/jvm/jdk-8u5-tuxjdk-b08/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"
test $? -ne 88 && break
Save it then open up IntelliJ, the fonts should work and you will be using Oracle JDK 8 for development. You will likely have to edit Project Settings and set up your JDK again but be sure to use the actual JDK and not the font fix one.
This fix also works with CLion, Android Studio and PyCharm.
These instructions assume the JDK version was 1.8.0_25, file/path names will change for future versions.
OpenJDK 6 is still in Ubuntu Trusty :
http://packages.ubuntu.com/search?keywords=openjdk
If you have a reasonably powerful computer you could consider using Qemu/KVM or VirtualBox and install Ubuntu Trusty (14.04) as a guest VM.
That would be the most clean solution in my opinion.
There's also a ppa for OpenJDK 6 which might or might not work in your Xenial install by editing the downloaded sources list file (Changing xenial into trusty) :
https://launchpad.net/ubuntu/+source/openjdk-6
In the latter case I recommend to remove the OpenJDK-8 first.
Best Answer
You can do this for;
Final Update
JDK
JRE
Old Update
I found two repository but I do not recommend
OpenJDK builds (all archs)
OpenJDK 8 backport for trusty
Original Message
If you really want to use OpenJDK, you have to compile from source. There is not still any PPA for OpenJDK.
It has been requested at https://bugs.launchpad.net/ubuntu/+bug/1297065
I recommend you to use Webup8 Oracle Java8 Installer
To automatically set up the Java 8 environment variables
Check it
So you have to wait to use OpenJDK8