What are the rationales behind that Java does not overwrite / remove its older updates after each update?

7

2

Can I uninstall the older updates?

Regarding updates, I am referring to those Update 1, Update 2, e.g. Java 7 Update 1, Java 7 Update 2, and so on.

I am speaking with respect to Java for Windows.

cychoi

Posted 2014-11-23T11:26:53.477

Reputation: 367

Answers

9

Should I uninstall older versions of Java?

We highly recommend that you uninstall all older versions of Java from your system. Keeping old versions of Java on your system presents a serious security risk. Uninstalling older versions of Java from your system ensures that Java applications will run with the latest security and performance improvements on your system.

Source: Why should I uninstall older versions of Java from my system?


The reason that the update doesn't remove the older version is to allow users to install more than one version of Java at the same time and then select different available Java versions for different applications, even though this is not recommended in Windows. See Oracle Java™ Runtime Environment Version Selection.

For uninstalling the older Java versions or updates, Oracle has released a separate application for uninstalling out-of-date versions of Java called Java Uninstall Tool for Windows. The Java Uninstall Tool for Windows runs with Java 6u10 and later versions on Windows XP and later up to Windows 8.

karel

Posted 2014-11-23T11:26:53.477

Reputation: 11 374

5But why doesn't the update remove the older version for you? Or upgrade over the previous version. There must be a reason that it does leave the old version in place, even if its removal is recommended.... – glallen – 2014-11-23T11:41:39.633

3

The reason that the update doesn't remove the older version is to allow users to install more than one version of Java at the same time and then select different available Java versions for different applications, even though this is not recommended in Windows. See Oracle Java™ Runtime Environment Version Selection.

– karel – 2014-11-23T11:49:03.650

The version selection reference link is good but long. If you could summarize the content in your answer then I would accept this as the best answer. – cychoi – 2014-11-23T13:39:30.647

3I was also wondering why they don't put a configurable option for whether you want to automatically uninstall the older versions or updates. As Java is having 50+ updates for a major release, those older updates eat up a lot of disk space. It's cumbersome to do manual uninstallations after each (auto) update... – cychoi – 2014-11-23T13:41:55.697

1

The Java Plug-in locates JREs to use from the entries listed in the Java Control Panel ("Java" tab, "View" button under "Java Applet Runtime Settings"). The available JREs in this list are encoded in the deployment.properties file, which in Windows is generally located in C:\Documents and Settings\[username]\Application Data\Sun\Java\Deployment. For uninstalling the older Java versions or updates, Oracle has released a separate application for uninstalling out-of-date versions of Java called Java Uninstall Tool for Windows

– karel – 2014-11-23T13:50:10.413

2It does remove older versions. Much older installers did not, but newer ones do. Also, the installer can be given an option that marks the installation as pinned. Future installers won't uninstall that version. This feature is intended for applications that require a specific version of java. Also, java versions that were installed before they changed the behavior to uninstall old versions will not be uninstalled. So at least one round of cleanup will be necessary if you have older versions that you don't need. – longneck – 2014-11-28T13:58:37.040

I have a very innovative idea... it's so brilliant, no wonder Sun and later Oracle couldn't come up with it: If the installer detects older versions, give the user a list of check boxes, where he can chose if they want to keep an old version! Wow... (Or is it just the JDK that doesn't remove old versions by default? I mean, I'm a developer, and I can deal with this and uninstall manually, but average users?) – ddekany – 2018-03-20T10:26:49.607

6

In rare cases a newer version of Java is NOT compatible with your existing software.
(Java sometimes removes certain features when going to a new version. And, more often the case, some functions get a slightly different behavior, which breaks some applications that relied on the old behavior.)

This mostly happens with version upgrades: Like version 1.6 to version 1.7, but it can happen in very rare cases with a minor update like 1.7.1 - 1.7.2 as well.
And sometimes certain stupid software just insists on a specific Java version being present even though it will work flawlessly with a new version.
(I have seen software that checked for the presence of a specific Java folder belonging to version 1.5.x, but it would happily work on 1.6.x as long as the folder existed. There weren't even any files in that folder.)

Because of all this it must be possible to run 2 or more versions in parallel and removing the old version isn't default.

P.S. Applications that really rely on a specific version of the Java run-time should use a private copy of that specific version inside their own program environment, in stead of using the version installed at the OS level. (This embedded copy will never be upgraded, except via an upgrade of the application that uses it.)
This is the recommended way of doing this, but not all software plays by the rules.

Tonny

Posted 2014-11-23T11:26:53.477

Reputation: 19 919