Why does my Java Swing app throw an error?

Issue

I see an error stating either Exception in thread "main" java.awt .HeadlessException or No X11 DISPLAY variable was set, but this program performed an operation which requires it..

Resolution

Heroku is a headless platform, and cannot support GUI applications that use javax.swing.JFrame, java.awt.Window.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support