You can define a custom JVM in eclipse.ini, according to Eclipse documentation:
One of the most recommended options to use is to specify a specific
JVM for Eclipse to run on. Doing this ensures that you are absolutely
certain which JVM Eclipse will run in and insulates you from system
changes that can alter the "default" JVM for your system. Many a user
has been tripped up because they thought they knew what JVM would be
used by default, but they thought wrong. eclipse.ini lets you be
CERTAIN.
In order to do that, you need to know where is your Eclipse home or define it. In a console run:
$ echo $ECLIPSE_HOME
If you get a path skip next step. If you get nothing, that means you've to define one. On your home directory just edit .bashrc file and at the last file add:
ECLIPSE_HOME=$HOME/.eclipse
After this your ECLIPSE_HOME will be /home/YOUR_USER/.eclipse
Once you've a defined ECLIPSE_HOME, you need to create or edit a file named eclipse.ini inside of your ECLIPSE_HOME directory. Such file should have the following content:
-vm
/opt/sun-jdk-1.6.0.02/bin/java
Where /opt/sun-jdk-1.6.0.02/bin/java is the absolute path to java.