Download and install the Apple version of Java (6): http://support.apple.com/kb/DL1572
If you need Java 8 SDK for some reason, the two can coexist because the Arduino IDE will explicitly ask for the (Apple Version) of Java 1.6 using 'JavaApplicationStub':
$ ./JavaApplicationStub
[JavaAppLauncher] Requested [1.5*], launching in [1.6] instead.
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Note however that if you have both Apple Java and Oracle installed, running 'java' or 'javac' form the command line will run the Oracle version.
$ java -version
java version "1.8.0_25"
If you need to switch the 'command line' version, change the symlinks in:
/System/Library/Frameworks/JavaVM.framework/Versions/
'JavaApplicationStub' will use the Apple version located in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
As such, 'normal' java programs will generally use the Oracle version, while applications running in your browser or using JavaApplicationStub explicitly (like Arduino) will use the 'Apple' version.