问题
I have been trying to run a Java AWT based application on an Ubuntu VM inside Docker. The application is a very simple one and it flawlessly runs on Windows through Eclipse. It simply opens up a window and prints hello world!. In fact when I export the jar file in to an Ubuntu VM that is running on my Windows host also gives me the same output as Windows when I run the jar file through “java -jar JFrameDocker.jar”.
However the story is not same when I try to run it inside docker. The instructions that I have specified in the Dockerfile executes without any error but when I run the application it throws
“java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable” . Trust me guys, I have tried many a times to resolve it but no luck till now.
Like setting the DISPLAY variable value multiple times, starting X server using xterm and xeyes, going through every poss