How to install an older version of Java

Posted by Alex Spurling on Ask Ubuntu See other posts from Ask Ubuntu or by Alex Spurling
Published on 2011-02-23T11:08:57Z Indexed on 2011/02/23 23:33 UTC
Read the original article Hit count: 327

Filed under:
|

I updated my installation of the sun-java6-jdk package today to version 6.24-1build0.10.10.1 after being prompted by the update manager. However this now causes some compilation failures so I'd like to revert back to the previous version that I had installed.

I've tried using Synaptic but the 'Force Version' menu command is disabled.

I've tried the following command to install the previous version

sudo apt-get install sun-java6-jdk=6.22-0ubuntu1~10.10

But I'm not sure that I have the correct version:

Reading package lists... Done 
Building dependency tree
Reading state information... Done 
E: Version ‘6.22-0ubuntu1~10.10’ for ‘sun-java6-jdk’ was not found

I've taken this version number from this changelog: https://launchpad.net/ubuntu/+source/sun-java6/+changelog

Is this the correct way to install a previous version of a package? Have I got the correct version from the sun-java6 change log?

© Ask Ubuntu or respective owner

Related posts about package-management

Related posts about java