Java Swing not working

Problem description:
I started a Java Swing project. Using your code it is giving me a lot of errors

Expected behavior:
Run your script

Actual behavior:
Getting errors:

 sh -c javac -classpath .:target/dependency/* -d . $(find . -type f -name '*.java')
 java -classpath .:target/dependency/* Main
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
    at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at java.desktop/sun.awt.X11GraphicsEnvironment$
    at java.base/
    at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(
    at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(
    at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(
    at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(
    at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
    at java.desktop/java.awt.Window.initGC(
    at java.desktop/java.awt.Window.init(
    at java.desktop/java.awt.Window.<init>(
    at java.desktop/java.awt.Frame.<init>(
    at java.desktop/javax.swing.JFrame.<init>(
    at Main.createAndShowGUI(
    at Main.main(
exit status 1

Steps to reproduce:

Bug appears at this link:


Tried on IOS and Windows 10 PC

Displays are currently not working. Welcome to Ask!

I’m getting the same error with code that worked last year. Looking for help also

Is this an issue that’s currently being worked on like an outage or do you mean it’s not a feature that’s available?

It is an outage, see here.