mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8344134: Use static property in SystemLookup
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
162d66adac
commit
207832952b
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ import java.util.function.Function;
|
|||
import jdk.internal.loader.NativeLibrary;
|
||||
import jdk.internal.loader.RawNativeLibraries;
|
||||
import jdk.internal.util.OperatingSystem;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
|
||||
import static java.lang.foreign.ValueLayout.ADDRESS;
|
||||
|
||||
|
@ -125,7 +126,7 @@ public final class SystemLookup implements SymbolLookup {
|
|||
* Returns the path of the given library name from JDK
|
||||
*/
|
||||
private static Path jdkLibraryPath(String name) {
|
||||
Path javahome = Path.of(System.getProperty("java.home"));
|
||||
Path javahome = Path.of(StaticProperty.javaHome());
|
||||
String lib = OperatingSystem.isWindows() ? "bin" : "lib";
|
||||
String libname = System.mapLibraryName(name);
|
||||
return javahome.resolve(lib).resolve(libname);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue