On Fri, Jan 29, 2021 at 11:40:29PM +0100, Thibaut Cuvelier wrote: Hi Thibaut,
> - This way to find Java is quite common on Windows platforms (actually, > it's a lot like a port of JavaCall.jl's relevant portion of code: > https://github.com/JuliaInterop/JavaCall.jl). It looks like Oracle's JVM > does the same at installation: https://stackoverflow.com/a/9094539/1066843. > Other JVMs mimic the same behaviour: > https://github.com/AdoptOpenJDK/openjdk-installer/issues/64. > Moreover, I don't think we can let beginner users on their own to configure > the PATH, we really should go an extra step to find a Java binary (while > letting the PATH have preference over anything else, so that users can > still choose which Java they want). > Using things like \HKEY_CLASSES_ROOT\Installer\Products\ is, in my opinion, > the wrong way to check for Java in the registry: these identifiers seem to > vary a lot between versions of Java ( > https://docs.oracle.com/en/java/javase/15/install/installation-jdk-microsoft-windows-platforms.html#GUID-886D35CE-76AF-43B4-8C2F-7B34DB8B1666). > On my machine, I have no 4EA42A62D9304AC4784BF2238120180F, for instance. That was actually my point. I found that key by searching for java with regedit after not finding JavaSoft under HKEY_LOCAL_MACHINE/SOFTWARE/ > I am attaching a new version of the patch based on > https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm#JSJIG-GUID-C11500A9-252C-46FE-BB17-FC5A9528EAEB. > Does it work for you? Otherwise, would you have something else under > HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft? I do not have HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft : $ ls -F /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Java* ls: No such file or directory but, after reading the stackoverflow link above, I found that I have: $ ls -F /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/JavaSoft/ 'Auto Update'/ 'Java Update'/ sponsorsoffered 'Java Plug-in'/ 'Java Web Start'/ 'Java Runtime Environment'/ 'Java Web Start Caps'/ and: $ ls -F /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/JavaSoft/Java\ Runtime\ Environment/ 1.8/ 1.8.0_281/ BrowserJavaVersion CurrentVersion So, it seems that you have to check also for the 32-bit version. -- Enrico -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel