Why does my Java Swing app throw an error?


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..


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