Ask coding questions

← Back to all posts
Are there two different Java Relp types?
JOSIAHWHITLOCK (2)

When I create a Java repl, it gives me a repl that doesn't seem to support things like the JOptionPane. Whenever I try to use it, it gives me an an error that:

Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.

I know that using a Java Swing project works, but I've seen other repls that are able to use JOptionPane that are seem to be normal Java repls, when I hover over the icon:

it says, "Java," not, "Java Swing."

Is there a way to get GUI to work in a normal Java repl?

Answered by InvisibleOne (2953) [earned 5 cycles]
View Answer
Comments
hotnewtop
InvisibleOne (2953)

No, I don't think so. I think you just have to go with java swing if you want to use the GUI