wrong Java version

I installed Arduino 1.6.12.

I have the following Java versions installed:

 ~/arduino-1.6.12 $ sudo update-alternatives --config java
Es gibt 2 Auswahlmöglichkeiten für die Alternative java (welche /usr/bin/java bereitstellen).

  Auswahl      Pfad                                            Priorität Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      Auto-Modus
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manueller Modus
  2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manueller Modus

Starting ./arduino give the following error when selecting Java 7:

~/arduino-1.6.12 $ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
Exception in thread "main" java.lang.UnsupportedClassVersionError: processing/app/Base : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

Starting ./arduino give the following error when selecting Java 6:

 ~/arduino-1.6.12 $ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
Exception in thread "main" java.lang.UnsupportedClassVersionError: processing/app/Base : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:648)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:206)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:270)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:406)

Interestingly, different code lines are mentioned, but both times version "52".

Do I need to install Java 1.5?

I solved it myself:
I am using Linux Mint 17.3 where only JAVA SDK 6 and 7 are available. After installing JAVA 8 from Oracle.com repository (an ensuring that JAVA and Arduino package are both 64bit), everything worked fine.

Could someone please add a remark in the installation guide https://www.arduino.cc/en/Guide/Linux that Java 8 is required?

Thanks.

First: Sorry for the necromancy, but I ran into this very same issue and this is the first google hit, even after changing my search a bit. As the current answer seems to be a bit misleading I feel this should be sorted out right here, not in a new thread.

So here's what I found out: the arduino IDE download comes with its own java version. If the executeables are somehow unreacheable (rights, etc) it defaults back to what your system has to offer. I did a 'chmod 777' on the java dir, and now it works fine. A chmod +x on some specific files would be probably enough, but well...

So, no need to upgrade or change your system's java, just make sure the prepackaged one inside the arduino IDE's directory works.

I think this issue occurs when you move the whole arduino-folder, or somehow remove the proper rights.