hotspot/src/share/vm/runtime/thread.cpp
changeset 47089 27050b653624
parent 46974 2c6c8846e176
child 47103 a993ec29ec75
--- a/hotspot/src/share/vm/runtime/thread.cpp	Mon Aug 28 23:46:22 2017 +0000
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Aug 17 17:26:02 2017 +0200
@@ -3925,13 +3925,12 @@
       }
     } else {
       // Try to load the agent from the standard dll directory
-      if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(),
+      if (os::dll_locate_lib(buffer, sizeof(buffer), Arguments::get_dll_dir(),
                              name)) {
         library = os::dll_load(buffer, ebuf, sizeof ebuf);
       }
-      if (library == NULL) { // Try the local directory
-        char ns[1] = {0};
-        if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) {
+      if (library == NULL) { // Try the library path directory.
+        if (os::dll_build_name(buffer, sizeof(buffer), name)) {
           library = os::dll_load(buffer, ebuf, sizeof ebuf);
         }
         if (library == NULL) {