mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Native libraries: load jawt.dll also on Windows when running in Java 9 and later (to be on the safe side)
This commit is contained in:
@@ -48,27 +48,25 @@ class FlatNativeLibrary
|
|||||||
|
|
||||||
String libraryName;
|
String libraryName;
|
||||||
if( SystemInfo.isWindows_10_orLater && (SystemInfo.isX86 || SystemInfo.isX86_64) ) {
|
if( SystemInfo.isWindows_10_orLater && (SystemInfo.isX86 || SystemInfo.isX86_64) ) {
|
||||||
// Windows: requires Windows 10 (x86 or x86_64)
|
// Windows: requires Windows 10/11 (x86 or x86_64)
|
||||||
|
|
||||||
libraryName = "flatlaf-windows-x86";
|
libraryName = "flatlaf-windows-x86";
|
||||||
if( SystemInfo.isX86_64 )
|
if( SystemInfo.isX86_64 )
|
||||||
libraryName += "_64";
|
libraryName += "_64";
|
||||||
|
|
||||||
// load jawt native library
|
// In Java 8, load jawt.dll (part of JRE) explicitly because it
|
||||||
if( !SystemInfo.isJava_9_orLater ) {
|
// is not found when running application with <jdk>/bin/java.exe.
|
||||||
// In Java 8, load jawt.dll (part of JRE) explicitly because it
|
// When using <jdk>/jre/bin/java.exe, it is found.
|
||||||
// is not found when running application with <jdk>/bin/java.exe.
|
// jawt.dll is located in <jdk>/jre/bin/.
|
||||||
// When using <jdk>/jre/bin/java.exe, it is found.
|
// Java 9 and later do not have this problem,
|
||||||
// jawt.dll is located in <jdk>/jre/bin/.
|
// but load jawt.dll anyway to be on the safe side.
|
||||||
// Java 9 and later do not have this problem.
|
loadJAWT();
|
||||||
loadJAWT();
|
|
||||||
}
|
|
||||||
} else if( SystemInfo.isLinux && SystemInfo.isX86_64 ) {
|
} else if( SystemInfo.isLinux && SystemInfo.isX86_64 ) {
|
||||||
// Linux: requires x86_64
|
// Linux: requires x86_64
|
||||||
|
|
||||||
libraryName = "flatlaf-linux-x86_64";
|
libraryName = "flatlaf-linux-x86_64";
|
||||||
|
|
||||||
// Load jawt.so (part of JRE) explicitly because it is not found
|
// Load libjawt.so (part of JRE) explicitly because it is not found
|
||||||
// in all Java versions/distributions.
|
// in all Java versions/distributions.
|
||||||
// E.g. not found in Java 13 and later from openjdk.java.net.
|
// E.g. not found in Java 13 and later from openjdk.java.net.
|
||||||
// There seems to be also differences between distributions.
|
// There seems to be also differences between distributions.
|
||||||
|
|||||||
Reference in New Issue
Block a user