ImageJ icon indicating copy to clipboard operation
ImageJ copied to clipboard

On first run, ImageJ.exe on Windows tries to access registry key with "All Access" where read access would be sufficient

Open Sethur opened this issue 5 years ago • 1 comments

OS: Windows 10 Java Version: Oracle JRE 1.8.0_221

When using a fresh, non-JRE-bundled install of ImageJ1 1.52d from https://imagej.nih.gov/ij/download.html , ImageJ.exe first tries to locate a JVM in the registry. To do this, the key "HKLM\SOFTWARE\WOW6432Node\JavaSoft\Java Runtime Environment" is accessed (I have a JAVA_HOME environment variable set as well, but this seems to be ignored).

For security reasons, the registry key "HKLM\SOFTWARE\WOW6432Node\JavaSoft\Java Runtime Environment" is not writable for default users on my system. ImageJ.exe, however, requests full permissions when accessing this key, which leads to the system denying the access alltogether and Imagej.exe subsequently not finding the JVM.

This registry access should be changed to a pure read request. Also, the environment variable JAVA_HOME should be taken into account if no registry entry is found.

Sethur avatar Nov 12 '19 09:11 Sethur

Bonus material: Screenshot of procmon:

image

Sethur avatar Nov 12 '19 09:11 Sethur