Skip to main content

Exception in thread "main" java.lang.UnsatisfiedLinkError

Desktop application cannot be launched with the error: Exception in thread "main" java.lang.UnsatisfiedLinkError

Written by Petr Pech

Identification

The desktop application fails to start and the debug logs contain the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
Can't find dependent libraries

Cause

On Windows, the file path (e.g. C:\Users\...) contains diacritical characters, and at the same time the following setting is enabled:

👉 "Beta: Use Unicode UTF-8 for worldwide language support"

This causes an issue with loading libraries (JNA).

Resolution

  1. Open:

    • Start → Settings → Time & Language

  2. Navigate to:

    • Additional date, time & regional settings

    • Change location

    • Change system locale

  3. Uncheck: Beta: Use Unicode UTF-8 for worldwide language support

  4. Restart your computer

Summary

  • error = problem loading libraries (JNA)

  • cause = diacritical characters + UTF-8 beta setting enabled

  • resolution = disable UTF-8 beta + restart

Did this answer your question?