ProgrammerAI (4)

Is there a way to use an X11 display on repl? Because I have a java program that apparently needs it. Every time I run, it gives me this error:

Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:233)
at Server.<init>(Server.java:19)
at Main.main(Main.java:4)

My Code

You are viewing a single comment. View All
SPQR (479)

You have to set the display variable before running. I fixed it for you here.

sjohns10maine (0)

Hi... I am trying to learn repl.it and can not seem to figure out how to get the Makefile to run the build to set the display. Any guidance is appreciated!

sjohns10maine (0)

I found the new java swing project type... sorry for the bother..;@sjohns10maine