How to downgrade JRE's version in Ubuntu?

3

1

Currently I am having JRE 1.6.0_20. How do I downgrade it to JRE 1.6.0_17?

How can I downgrade?

I'm using Ubuntu 10.04 LTS.

Jigar Joshi

Posted 2010-05-13T12:16:43.107

Reputation: 399

1You do know there is a security issue relating to remote code execution with Java < 1.6.0_20 don't you? Is there any reason you need that specific version such as missing features? – Mokubai – 2010-05-13T12:36:28.407

Answers

3

When you downgrade, you'll probably want to keep it that way (having the update manager ignore the newer version), this list thread and the APT-HowTo seem to go through what's needed to do that.

Specifically check out How to keep a mixed system:

# apt-get install package=version

And How to keep specific versions of packages installed (complex), adding this to /etc/apt/preferences:

Package: <package>
Pin: <pin definition>
Pin-Priority: <pin's priority>

Update: To clarify some things: 1. Ubuntu 10.04 does not use Sun's JRE by default. Infact you need to enable repositories to install it.

As stated in my comments, just follow the above pattern:

apt-get install default-jre=1.6.0_17 

Or for Sun's

apt-get install sun-java6-jre=1.6.0_17 

But I doubt that will work, considering that the latest version of Sun's JRE is listed as 6.20.

Tim Lytle

Posted 2010-05-13T12:16:43.107

Reputation: 959

Thanks Tim Lyte for your time , i am trying it by downloading rpm packages externally . will let u know if it fails. – Jigar Joshi – 2010-05-13T12:53:36.143

RPMs are meant for ReadHat (Fedora/CentOS/Etc), not Ubuntu/Debian. Look for a .deb file if you're trying to downgrade with a downloaded package. – Tim Lytle – 2010-05-13T13:57:18.260

no it takes older version (newer version previously installed), in my case it is java can you specify how can i install java jre&jdk 1.6.0_17 by apt-get ? – Jigar Joshi – 2010-05-13T14:08:37.513

It really depends on what package you're installing. For Ubuntu's default (in 10.04) it would be apt-get install default-jre=1.6.0_17 Just follow the pattern given in my answer. – Tim Lytle – 2010-05-13T14:31:40.353

in ubuntu 10.4 default version of sun-java6-jre is 1.6.0_20 i want 1.6.0_17 – Jigar Joshi – 2010-05-13T14:47:16.953

let me re ask this question apecifically – Jigar Joshi – 2010-05-13T14:48:45.873

@abc, No, in 10.04 the default java isn't from sun, perhaps that's your problem. – Tim Lytle – 2010-05-13T19:09:32.550

yeah its openJdk, but when i fire apt-get install sun-java6-jre it installs the 1.6.0_20 update by default. i want to downgrade to 1.6.0_17 – Jigar Joshi – 2010-05-14T04:41:49.797

sudo apt-get install sun-java6-jre=1.6.0_17 Reading package lists... Done Building dependency tree
Reading state information... Done E: Version '1.6.0_17' for 'sun-java6-jre' was not found
– Jigar Joshi – 2010-05-14T05:04:12.053

As noted in my updated answer, I don't think that version exists for Sun's JRE. – Tim Lytle – 2010-05-14T21:51:18.947