Java IHM doesn't work



hi, i execute this code on bash :

And i get 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( at java.awt.Window.<init>( at java.awt.Frame.<init>( at javax.swing.JFrame.<init>( at Main.main(

Why please?

How to set DISPLAY in my workspace

This doesn’t work because the vm doesn’t have a display and running x11 server
you can add DISPLAY to environment in the runner but that’s probably not very useful as you won’t be able to see any output