From f36a2bbd15d94d4371c2117ce08b7f04a0d59da4 Mon Sep 17 00:00:00 2001 From: Andy Herrick Date: Fri, 24 Sep 2021 12:43:25 +0000 Subject: [PATCH] 8274087: Windows DLL path not set correctly. Reviewed-by: almatvee, asemenyuk --- src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp b/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp index a3b8f150082..d68521a13a5 100644 --- a/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp +++ b/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp @@ -139,8 +139,6 @@ void launchApp() { const tstring launcherPath = SysInfo::getProcessModulePath(); const tstring appImageRoot = FileUtils::dirname(launcherPath); const tstring appDirPath = FileUtils::mkpath() << appImageRoot << _T("app"); - const tstring runtimeBinPath = FileUtils::mkpath() - << appImageRoot << _T("runtime") << _T("bin"); const AppLauncher appLauncher = AppLauncher().setImageRoot(appImageRoot) .addJvmLibName(_T("bin\\jli.dll")) @@ -188,9 +186,11 @@ void launchApp() { return; } - // zip.dll may be loaded by java without full path + // zip.dll (and others) may be loaded by java without full path // make sure it will look in runtime/bin + const tstring runtimeBinPath = FileUtils::dirname(jvm->getPath()); SetDllDirectory(runtimeBinPath.c_str()); + LOG_TRACE(tstrings::any() << "SetDllDirectory to: " << runtimeBinPath); const DllWrapper jliDll(jvm->getPath()); std::unique_ptr splashDll;