JDK-8133495 : Platform.getInstalledJREList() returns only the jres of the current arch on windows.
  • Type: Bug
  • Component: deploy
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-08-12
  • Updated: 2016-07-21
  • Resolved: 2015-08-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u102Fixed 9 b82Fixed
Related Reports
Relates :  
Description
The current implementation of getInstalledJREList returns a vector of installed jres of the current architecture.
Since we now have inter architecture support on windows, we need it to return list of all the jres available, along with the archecture of each one. (currently, it is just assumed that all those returned are of the current architecture).

To demonstrate, install 32 and 64 bit versions of JDK9 on windows, clear out deployment.properties (or at least the jre part of it).
Then run 32 bit jcp.
You will see just the 32 bit jre in the java tab.
Then run 64 bit jcp
You will see both the 32 and 64 bit versions in the java tab.
You can then run 32 bit jcp and see both.

The point is the 32 bit jres won't be "discovered" till you run some 32 bit deployment code.
The 64 bit jres won't be "discovered till you run som 64 bit deployment code.

Running either should discover both.
Comments
crucible review for backport to 8u: https://java.se.oracle.com/code/cru/CR-JDK8UDEV-321
16-02-2016

https://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx By default, a 32-bit application running on WOW64 accesses the 32-bit registry view and a 64-bit application accesses the 64-bit registry view. The following flags enable 32-bit applications to access redirected keys in the 64-bit registry view and 64-bit applications to access redirected keys in the 32-bit registry view. Flag name Value Description KEY_WOW64_64KEY 0x0100 Access a 64-bit key from either a 32-bit or 64-bit application. KEY_WOW64_32KEY 0x0200 Access a 32-bit key from either a 32-bit or 64-bit application.
24-08-2015