Plataforma y: Arquitectura:
Windows10.0.18362
OpenJDK11U-jre_x64_windows_hotspot_11.0.6_10.zip
OpenJDK11U-jre_x86-32_windows_hotspot_11.0.6_10.zip
Pasos para reproducir el problema:
$ jdk漢字含む\bin\java -version
Error occurred during initialization of VM
Unable to load native library:
$ ren jdk漢字含む jdk
$ jdk\bin\java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
jdk-11.0.5 + 10-jre no causó el error.
Gracias por tus binarios.
Parece ser lo mismo con los caracteres coreanos.
Reportado por un usuario en mi aplicación, jlink build con jdk-11.0.6 + 10
El guión de lanzamiento en la imagen.
<strong i="10">@echo</strong> off
set DIR="%~dp0"
set JAVA_EXEC="%DIR:"=%\java"
%JAVA_EXEC% -p "%~dp0/../app" -m com.pmm.ParadoxosGameModManager/com.pmm.ParadoxosGameModManager.ModManager %*
Editar: también probado con 11.0.5, confirme que funciona
@ himawari-san ¿Puedes probar la versión 11.0.6 de adoptopenjdk.net/upstream.html, por favor?
@karianna tengo el mismo error.
Gracias por su apoyo.
Creo que es un error en upstream. Confirmé este problema en la fuente jdk / jdk actual. Ocurrirá en cualquier ruta que contenga caracteres CJK.
Puedo solucionarlo con el parche como se muestra a continuación, por lo que quiero enviar una solicitud de revisión para hotspot-runtime-dev en OpenJDK. ¿Alguna vez ha trabajado para la comunidad OpenJDK? Si no es así, lo presentaré a JBS.
diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp
--- a/src/hotspot/os/windows/os_windows.cpp
+++ b/src/hotspot/os/windows/os_windows.cpp
@@ -4207,14 +4207,16 @@
size_t prefix_len = wcslen(prefix);
size_t full_path_size = is_abs ? 1 + buf_len : JVM_MAXPATHLEN;
size_t result_size = prefix_len + full_path_size - prefix_off;
- result = (wchar_t*) os::malloc(sizeof(wchar_t) * (additional_space + result_size), mtInternal);
+ size_t result_buffer_size = sizeof(wchar_t) * (additional_space + result_size);
+ result = (wchar_t*) os::malloc(result_buffer_size, mtInternal);
if (result == NULL) {
err = ENOMEM;
} else {
- size_t converted_chars;
+ ZeroMemory(result, result_buffer_size);
wchar_t* path_start = result + prefix_len - prefix_off;
- err = ::mbstowcs_s(&converted_chars, path_start, buf_len + 1, buf, buf_len);
+ int win32_ret = MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, buf, (int)buf_len, path_start, (int)(buf_len + 1));
+ err = (win32_ret == 0) ? EINVAL : ERROR_SUCCESS;
if ((err == ERROR_SUCCESS) && needs_fullpath) {
wchar_t* tmp = (wchar_t*) os::malloc(sizeof(wchar_t) * full_path_size, mtInternal);
@YaSuenag No, no lo he hecho. Agradezco tu ayuda.
Informé este problema a JBS y envié una solicitud de revisión a hotspot-runtime-dev.
https://bugs.openjdk.java.net/browse/JDK-8240197
https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-February/038330.html
@YaSuenag ¡ gracias por tu contribución!
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-March/038397.html
Comentario más útil
Solucioné este problema en realicé una seguridad a