On Sat, 24 Aug 2024 at 03:02, Naoto Sato <[email protected]> wrote:
> > I am sorry but initializing Java runtime by checking if an application's > own DLL is loaded or not is something the Java runtime should not do. > 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. > That won't even work with Cygwin, or other Unix like shells. 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. > The only > option I would see is again check the POSIX environment variables > (regardless of the shell) and use it, but I don't think that is a viable > option as I wrote in the previous email. > 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. So I still don't understand why this JDK-8337077 bug could not be fixed properly. The proposed fix is relatively simple.
