Wayland의 Docker 컨테이너에서 Java Abstract Window Toolkit 애플리케이션 실행

Wayland의 Docker 컨테이너에서 Java Abstract Window Toolkit 애플리케이션 실행

지난 몇 년 동안다음 명령을 실행하여 Docker 컨테이너에서 Java Swing 애플리케이션을 실행했습니다.:

docker run -u 1000:1000 --rm --name etax_zug --hostname etax-zug \
  -e DISPLAY=unix:0 \
  -e XAUTHORITY=/tmp/xauth \
  -v $XAUTHORITY:/tmp/xauth \
  -v /tmp/.X11-unix:/tmp/.X11-unix etax_zug:latest

이제 Wayland로 전환했지만 더 이상 작동하지 않습니다.

An error occurred:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
Error log: /tmp/install4jError18129787635997487010.log
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
    at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
    at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:232)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:588)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:583)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:582)
    at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1494)
    at java.desktop/java.awt.EventQueue.isDispatchThread(EventQueue.java:1086)
    at com.install4j.runtime.installer.frontend.GUIHelper.invokeOnEDT(GUIHelper.java:436)
    at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:83)
    at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(ConsoleScreenExecutor.java:25)
    at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(InstallerConsoleScreenExecutor.java:6)
    at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:84)
    at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:60)
    at com.install4j.runtime.installer.Installer.main(Installer.java:46)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
    at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69)
    at install4j.Installer3606950382.main(Unknown Source)

Wayland에서도 이 기능을 어떻게 구현할 수 있나요?

당신이 있다면 보너스 카르마 포인트를 받으세요끌어오기 요청 만들기이 솔루션은 Podman에서도 작동합니다. ;)

관련 정보