Skip to content

Commit

Permalink
8263157: [macos]: java.library.path is being set incorrectly
Browse files Browse the repository at this point in the history
Reviewed-by: asemenyuk, herrick
  • Loading branch information
Alexander Matveev committed Apr 13, 2021
1 parent e80012e commit 55d5649
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/jdk.jpackage/share/native/applauncher/AppLauncher.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -116,7 +116,10 @@ Jvm* AppLauncher::createJvmLauncher() const {

(*jvm)
.setPath(findJvmLib(cfgFile, defaultRuntimePath, jvmLibNames))
.addArgument(launcherPath);
.addArgument(launcherPath)
.addArgument(_T("-Djava.library.path=")
+ appDirPath + FileUtils::pathSeparator
+ FileUtils::dirname(launcherPath));

if (initJvmFromCmdlineOnly) {
tstring_array::const_iterator argIt = args.begin();
Expand Down

1 comment on commit 55d5649

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.