diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index f8ac591a786..d78f8db79c3 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -2276,6 +2276,11 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_ bool failed = false; String version_to_use; + String java_sdk_path = EDITOR_GET("export/android/java_sdk_path"); + if (!java_sdk_path.is_empty()) { + OS::get_singleton()->set_environment("JAVA_HOME", java_sdk_path); + } + List args; args.push_back("--version"); String output; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index f9c636a4a61..e6e8c6aaefb 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -101,7 +101,7 @@ static String fix_path(const String &p_path) { } path = path.simplify_path(); path = path.replace("/", "\\"); - if (!path.is_network_share_path() && !path.begins_with(R"(\\?\)")) { + if (path.size() >= MAX_PATH && !path.is_network_share_path() && !path.begins_with(R"(\\?\)")) { path = R"(\\?\)" + path; } return path;