test/lib/jdk/test/lib/Platform.java
changeset 53273 bbc79e0ec9ee
parent 52590 c6b63df2765f
child 55746 709913d8ace9
child 58678 9cf78a70fa4f
--- a/test/lib/jdk/test/lib/Platform.java	Mon Jan 14 12:49:12 2019 +0100
+++ b/test/lib/jdk/test/lib/Platform.java	Mon Jan 14 00:00:00 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, 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
@@ -325,6 +325,21 @@
         }
     }
 
+    /*
+     * Returns name of system variable containing paths to shared native libraries.
+     */
+    public static String sharedLibraryPathVariableName() {
+        if (isWindows()) {
+            return "PATH";
+        } else if (isOSX()) {
+            return "DYLD_LIBRARY_PATH";
+        } else if (isAix()) {
+            return "LIBPATH";
+        } else {
+            return "LD_LIBRARY_PATH";
+        }
+    }
+
     public static boolean isDefaultCDSArchiveSupported() {
         return (is64bit()  &&
                 isServer() &&