1

I have a problem for several months now.

I have a big application in Java 1.7 and Java FX on centos 6. When I'm launching with idea Intellij CE 2017.1.1, I have this exception with a JDK 7 :

Failed in XOpenDisplay
(java:181803): Gtk-WARNING**: cannot open display:

With JDK 8 :

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Unable to open DISPLAY
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:68)

At the beginning, it worked with Intellij. But one day, it failed with this exception and I can't find why. I recreated my workspace several time without success. It works with Eclipse with the same code. It works if I copy the CLI displayed in the "run window" at the beginning of the running program in IntelliJ in a console.

Now, I have an instance of eclipse to run the application and I'm writing the code in IntelliJ. But I would like use only IntelliJ.

Thx for your help

DidierC

liberforce
  • 11,189
  • 37
  • 48
DidierC
  • 33
  • 4
  • Does this offer any help? https://stackoverflow.com/questions/21162383/deploy-javafx-on-ubuntu-server-without-display – Sam Feb 22 '18 at 14:31
  • Perhaps IntelliJ is using a different JDK/JRE which has some incompatibility? Go to Project Structure and look at the configured SDK... – Itai Feb 22 '18 at 14:42

1 Answers1

0

thx for your replies.

6 months of searching alone. A coworker come to ask a question. 10 min of searching and we found it.

In Intellij launcher. I had uncheck the "include parent environment variables" in the "Environment variables" window. I can't remember why. I check again and it works.

DidierC
  • 33
  • 4