過去数年間次のコマンドを実行して、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でも動作します。 ;)