Eclipse Cannot connect to keystore

If you get the following error:

An error occurred during provisioning.
  Cannot connect to keystore.
  JKS

You need to check what version of java you’re running. I’m running Debian and hat gij installed and this is no use for eclipse. I tried the following:

apt-get install openjdk-6-jdk
update-java-alternatives -s java-6-openjdk

but this failed miserably. I ended up downloading and installing a new java bundle from Sun and removing every debian package related to Java.