diff --git a/CHANGELOG.md b/CHANGELOG.md index e15d2137..9f80f834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,14 @@ FlatLaf Change Log use same component for rendering and editing. (issue #385) +## 1.6.1 + +#### 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 #### New features and improvements diff --git a/build.gradle.kts b/build.gradle.kts index 69eb9fa7..b46629d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ * limitations under the License. */ -val releaseVersion = "1.6" +val releaseVersion = "1.6.1" val developmentVersion = "2.0-SNAPSHOT" version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java index 9bcca253..311e46c3 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java @@ -96,6 +96,11 @@ class FlatWindowsNativeWindowBorder // Java 9 and later does not have this problem. try { 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 ) { LoggingFacade.INSTANCE.logSevere( null, ex ); }