Skip to main content

Exception in thread "main" java.lang.UnsatisfiedLinkError

Desktop application fails to launch with 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 path (e.g. C:\Users\...) contains diacritics 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).

Solution

  1. Open:

    • Start → Settings → Time & Language

  2. Navigate to:

    • Additional date, time & regional settings

    • Change location

    • Change system locale

  3. Uncheck: Beta: Použít Unicode UTF-8 pro celosvětovou podporu jazyka

  4. Restart your computer

Summary

  • error = problem loading libraries (JNA)

  • cause = diacritics + UTF-8 beta setting enabled

  • solution = disable UTF-8 beta + restart

Did this answer your question?