A
Andres Medina
Hi
I developed a program that runs simulations. My first version used
JFrames to show a User Interface. But I noticed it would be very
helpful if the program could run in the background (I use Linux) and
perhaps I can run it remotely through ssh.
I changed everything so that, if the user choosed the "NO-GUI" option,
no JFrames were visible, altough I did not remove the instances of the
JFrames (Because to do so, I have to make big changes in the code).
The program works fine, for example in a GNOME terminal (of course,
the display is still there), but it does not run through ssh. I get
the following 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:159)
at java.awt.Window.<init>(Window.java:310)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:194)
at ams.utils.ui.SimUI.<init>(Unknown Source)
at ams.utils.ui.SimUI.main(Unknown Source)
Can anyone tell me, if it is posible to do what I am trying?
I developed a program that runs simulations. My first version used
JFrames to show a User Interface. But I noticed it would be very
helpful if the program could run in the background (I use Linux) and
perhaps I can run it remotely through ssh.
I changed everything so that, if the user choosed the "NO-GUI" option,
no JFrames were visible, altough I did not remove the instances of the
JFrames (Because to do so, I have to make big changes in the code).
The program works fine, for example in a GNOME terminal (of course,
the display is still there), but it does not run through ssh. I get
the following 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:159)
at java.awt.Window.<init>(Window.java:310)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:194)
at ams.utils.ui.SimUI.<init>(Unknown Source)
at ams.utils.ui.SimUI.main(Unknown Source)
Can anyone tell me, if it is posible to do what I am trying?