Skip to content

Commit acacae5

Browse files
author
Andy Herrick
committed
8254843: Exception launching app on windows in some cases
Reviewed-by: asemenyuk, kcr, almatvee, kizune
1 parent 856037c commit acacae5

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/jdk.incubator.jpackage/windows/native/applauncher/WinLauncher.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,11 @@ class DllWrapper {
105105
public:
106106
DllWrapper(const tstring& dllName) {
107107
try {
108-
// Try load DLL.
109-
dll = std::unique_ptr<Dll>(new Dll(dllName));
110-
LOG_TRACE(tstrings::any() << "Load [" << dllName << "]: OK");
111-
}
112-
catch (const std::exception&) {
113-
// JVM DLL load failed, though it exists in file system.
114-
try {
115-
// Try adjust the DLL search paths with AddDllDirectory() WINAPI CALL
116-
dll = loadDllWithAddDllDirectory(dllName);
117-
}
118-
catch (const std::exception&) {
119-
// AddDllDirectory() didn't work. Try altering PATH environment
120-
// variable as the last resort.
121-
dll = loadDllWithAlteredPATH(dllName);
122-
}
108+
// Adjust the DLL search paths with AddDllDirectory() WINAPI CALL
109+
dll = loadDllWithAddDllDirectory(dllName);
110+
} catch (const std::exception&) {
111+
// Alter PATH environment variable as the last resort.
112+
dll = loadDllWithAlteredPATH(dllName);
123113
}
124114
}
125115

0 commit comments

Comments
 (0)