Java IHM doesn't work

java

#1

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(GraphicsEnvironment.java:207) at java.awt.Window.<init>(Window.java:535) at java.awt.Frame.<init>(Frame.java:420) at javax.swing.JFrame.<init>(JFrame.java:218) at Main.main(Main.java:15)

Why please?


How to set DISPLAY in my workspace
#2

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 http://stackoverflow.com/questions/662421/no-x11-display-variable-what-does-it-mean