Skip to content

Commit 55d5649

Browse files
author
Alexander Matveev
committed
8263157: [macos]: java.library.path is being set incorrectly
Reviewed-by: asemenyuk, herrick
1 parent e80012e commit 55d5649

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/jdk.jpackage/share/native/applauncher/AppLauncher.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,10 @@ Jvm* AppLauncher::createJvmLauncher() const {
116116

117117
(*jvm)
118118
.setPath(findJvmLib(cfgFile, defaultRuntimePath, jvmLibNames))
119-
.addArgument(launcherPath);
119+
.addArgument(launcherPath)
120+
.addArgument(_T("-Djava.library.path=")
121+
+ appDirPath + FileUtils::pathSeparator
122+
+ FileUtils::dirname(launcherPath));
120123

121124
if (initJvmFromCmdlineOnly) {
122125
tstring_array::const_iterator argIt = args.begin();

0 commit comments

Comments
 (0)