openjdk icon indicating copy to clipboard operation
openjdk copied to clipboard

Microsoft OpenJDK 11 not allowing users to downgrade. to lower version

Open GouriKumari opened this issue 2 years ago • 2 comments

Describe the bug Microsoft Open JDK11 installer is not allowing to downgrade to a lower version

Desktop (please complete the following information): OS & version [e.g. Windows 10, 1822]: macOS BigSur 12.2.x MSFT Build of OpenJDK Version: Microsoft OpenJDK11, 11.0.15 and Microsoft OpenJDK11, 11.0.12.7 The output from java --version 11.0.15

To Reproduce: Steps to reproduce the behavior:

  1. Install Java SDK using https://aka.ms/download-jdk/microsoft-jdk-11.0.15-macOS-x64.pkg
  2. Execute javac --version from terminal . 11.0.15 is returned
  3. Install https://download.visualstudio.microsoft.com/download/pr/0df4ef07-5a9a-4fc2-8ae6-0b6731685d25/fb07059f75bd3916b490f2d266bc94c0/microsoft-jdk-11.0.12.7.1-macos-x64.pkg
  4. Execute javac --version from terminal . 11.0.15 is returned Expected behavior Microsoft Build OfOpen JDK 11 .0.15 should get downgraded to Microsoft Build Of Open JDK 11 .0.12.7 javac --version should return 11.0.12.7.1 Actual behavior javac --version returned in both cases is 11.0.15.

Screenshots, Logs etc

Additional context

GouriKumari avatar May 24 '22 18:05 GouriKumari

We're discussing whether the downgrade is the correct or desired behaviour here. One argument is that the newer point release of the MSFT Build of OpenJDK is better for the end user here.

karianna avatar May 25 '22 18:05 karianna

Installing an older version, and having the older version active, may be considered a security issue by many users. If the installer doesn't downgrade today, it may be because of that security intent.

If it doesn't downgrade but it should - as in, there is a bug - then we will re-evaluate the expected behavior.

Also, we need to ensure the same behavior across all installers for Mac, Windows, and Linux, across all architectures (x64, Arm, and Apple Silicon).

brunoborges avatar May 25 '22 19:05 brunoborges

For now, the installer's behaviour is to install the version aside from any other existing version. It is up to the user to manage which versions are installed, and which ones are used where.

brunoborges avatar Nov 09 '22 17:11 brunoborges

This issue is fixed in the VS for Mac Updater/Installer with the latest release. Updater won't offer lower versions of Microsoft Build Of Open JDK or Adoptium JDK if user machine already has a higher version of JDK installed.

GouriKumari avatar Nov 09 '22 17:11 GouriKumari