8174202: jtreg AOT tests should not assume library extension of .so

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2017-08-11 16:06:55 -07:00
parent abea66332b
commit f6b2ad32f7

View File

@ -274,4 +274,18 @@ public class Platform {
.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";
}
}
}