5

I'm recently working with Eclipse Che and have the task to import a Java Project that opens a GUI in it (like a simple Swing/SWT Calculator).

I am using the Java CentOS Stack, importing the .jar files, etc. is no problem but I get the "No X11 DISPLAY variable was set, but this program performed an operation which requires it." error.

Obviously, I found many threads about that Error, but I just wanted to ask if it is even possible to open a GUI in a web based IDE like Eclipse Che before wasting hours trying to fix that error when it's not even possible.

Maybe some of you already tried that and have a solution/tip or smth for me.

edit: found a video that answered my question. https://www.youtube.com/watch?v=AjgSp0dkxxU

Thanks anyway.

LBohr
  • 51
  • 4

2 Answers2

2

This will help you out - https://eclipse-che.readme.io/docs/che-and-swing

You need to use the right stack

bianchi
  • 500
  • 2
  • 12
0

You need to set the display variable. The way I did this was modify the run command to set it just before the other commands.

The command I used is:

export DISPLAY=:0.0

Also note that this worked for a while for me but randomly stop working a few days back so please tell if you manage to get it working.

Andrew Mcghie
  • 153
  • 1
  • 3
  • 13
  • 1
    That, literally, was the first thing i tried. When i type this into my Terminal it just gives me a blank line and nothing happens. – LBohr Oct 05 '16 at 12:26