imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
558 stars 225 forks source link

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

Open Sethur opened 4 years ago

Sethur commented 4 years ago

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 commented 4 years ago

Bonus material: Screenshot of procmon:

image