in order to set the default java jre to use go terminal:

root@debian7:/home/user# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
 1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
root@debian7:/home/user# uname -a

tested on : Linux debian7 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux

if you have no java installed go:

apt-get install openjdk-7-jre openjdk-7-sdk;

if you are getting this error:

user@debian7:~$ /Applications/eclipse/eclipse
(java:4054): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager'

you need to terminal:

export SWT_GTK3=0

source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736
admin