mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 14:30:56 +03:00
Native window decorations: catch UnsatisfiedLinkError when trying to load jawt.dll to avoid an application crash (Java 8 on Windows 10 only)
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## 1.6.1-SNAPSHOT
|
||||||
|
|
||||||
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- Native window decorations: Catch `UnsatisfiedLinkError` when trying to load
|
||||||
|
`jawt.dll` to avoid an application crash (Java 8 on Windows 10 only).
|
||||||
|
|
||||||
|
|
||||||
## 1.6
|
## 1.6
|
||||||
|
|
||||||
#### New features and improvements
|
#### New features and improvements
|
||||||
|
|||||||
@@ -96,6 +96,11 @@ class FlatWindowsNativeWindowBorder
|
|||||||
// Java 9 and later does not have this problem.
|
// Java 9 and later does not have this problem.
|
||||||
try {
|
try {
|
||||||
System.loadLibrary( "jawt" );
|
System.loadLibrary( "jawt" );
|
||||||
|
} catch( UnsatisfiedLinkError ex ) {
|
||||||
|
// log error only if native library jawt.dll not already loaded
|
||||||
|
String message = ex.getMessage();
|
||||||
|
if( message == null || !message.contains( "already loaded in another classloader" ) )
|
||||||
|
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||||
} catch( Exception ex ) {
|
} catch( Exception ex ) {
|
||||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user