No X11 Display Variable was set ,but this program performed an operation which requires it

272 views Asked by At

I am trying to run a Java application on Linux boxes but I am getting this exception: in java.awt.headless exception stating this

No x11 display variable was set

Also, this code works fine in my locally (windows) but gives exceptions on the Linux server after deployment. I have tried several ways to do it on Linux as well as on Java side to resolve but still no luck like

Setting java.awt.headless =true 

or false then setting system.property with this then setting display variable with export display and also starting xeyes ,xorg and startx command also tried but still no luck

Please suggest to me how to resolve this exception

This app is generating some images using Jfreechart and for viewing the images we need a display that is not available on Linux but it's on Windows I need to deploy this app anyhow into Linux to make it to production and it's failing at the dev level now. Please help me resolve this exception. How can I have the Display available in Linux or how can I suppress this I don't need to view the images you just generate the images there itself.

X11forwarding is also set to yes

0

There are 0 answers