# HG changeset patch # User iignatyev # Date 1502492815 25200 # Node ID b5e5ec91094dfb391178b133c70e8fde2045259e # Parent eefffdb26909afee374991a2d3455ed0a7242edd 8174202: jtreg AOT tests should not assume library extension of .so Reviewed-by: kvn diff -r eefffdb26909 -r b5e5ec91094d test/lib/jdk/test/lib/Platform.java --- a/test/lib/jdk/test/lib/Platform.java Thu Aug 10 11:11:52 2017 -0400 +++ b/test/lib/jdk/test/lib/Platform.java Fri Aug 11 16:06:55 2017 -0700 @@ -274,4 +274,18 @@ .matcher(osArch) .matches(); } + + /** + * Returns file extension of shared library, e.g. "so" on linux, "dll" on windows. + * @return file extension + */ + public static String sharedLibraryExt() { + if (isWindows()) { + return "dll"; + } else if (isOSX()) { + return "dylib"; + } else { + return "so"; + } + } }