<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 24 Aug 2024 at 03:02, Naoto Sato <<a href="mailto:naoto.sato@oracle.com">naoto.sato@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I am sorry but initializing Java runtime by checking if an application's <br>
own DLL is loaded or not is something the Java runtime should not do. <br></blockquote><div><br></div><div>Could you explain what is wrong in checking that the parent process has some specified DLL loaded, during initialization of Java runtime? I suppose the initialization of Java runtime has many other much more sophisticated things to do. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
That won't even work with Cygwin, or other Unix like shells.</blockquote><div><br></div><div>It will definitely work with Cygwin as well as with MSYS2. You just need to check for the cygwin1.dll in addition to the msys-2.0.dll check.<br></div><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> The only <br>
option I would see is again check the POSIX environment variables <br>
(regardless of the shell) and use it, but I don't think that is a viable <br>
option as I wrote in the previous email.<br></blockquote><div><br></div><div>The POSIX LC_CTYPE environment variable is always available in MSYS2 and Cygwin environments. The only thing that should be done before working with the LC_CTYPE environment variable on Windows is checking that Java runtime is running under
MSYS2 or Cygwin. To do that I offered checking that either
msys-2.0.dll or
cygwin1.dll is loaded by the parent process of the Java runtime.</div><div><br></div><div>So I still don't understand why this JDK-8337077 bug could not be fixed properly. The proposed fix is relatively simple.<br></div></div></div>