Recently I tried to use Eclipse but when I open it,it told me my JVM verion is too old
Incompatible JVM
Version 1.5.0_05 of the JVM is not suitable for this prod
In your ~/.bashrc file add the following lines
export JAVA_HOME=/home/username/jdk1.7.0_11
export JDK_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
in place of jdk1.7.0_11 put your JDK and see to it that the specified path is correct(wherever you have youe JDK).