Error: libjvm.so failed to load: j9vm29 in Docker Desktop Mac M3 Sonoma 14.3

580 Views Asked by At

I am getting errors after upgrading to macOS Sonoma 14.3 in docker container. Container image is build on top of eclipse-temurin:17.0.8.1_1-jdk-jammy.

  • Device: Macbook M3 Pro
  • OS version: Sonoma 14.3
  • Docker Desktop Version: v4.26.1
2024-01-23 15:40:38 libjvm.so preloadLibrary(/opt/java/openjdk/lib/compressedrefs/libj9vm29.so): /opt/java/openjdk/lib/compressedrefs/libj9vm29.so: cannot enable executable stack as shared object requires: Invalid argument
2024-01-23 15:40:38 libjvm.so failed to load: j9vm29

Building images and running container in docker.

2

There are 2 best solutions below

0
On

From this answer:
https://stackoverflow.com/a/77880846/19797701

If you have Rosetta enabled in Docker Desktop, try disabling it (should be under "General" in Docker Desktop settings).

2
On

With MacOS Sonoma 14.4 (23E214) update, this JDK issue is fixed.