I setup the remote debugging in NetBeans IDE between 2 Linux systems. Remote debugging an application that does not have a GUI works ok, but I am getting this error when I try to remote debug an application that has swing GUI:
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
I would appreciate any suggestion!
NetBeans output window:
ant -f /home/toma/NetBeansProjects/GUIFormExamples -Dremote.platform.password=***** -Dremote.platform.rp.target=linux-15 -Dremote.platform.java.spec.ver=17 -Dremote.platform.rp.filename=linux -Ddebug.class=Antenna -Dnb.internal.action.name=debug debug-remote init: Deleting: /home/toma/NetBeansProjects/GUIFormExamples/build/built-jar.properties deps-jar: Updating property file: /home/toma/NetBeansProjects/GUIFormExamples/build/built-jar.properties compile: Copying 1 file to /home/toma/NetBeansProjects/GUIFormExamples/build Copy libraries to /home/toma/NetBeansProjects/GUIFormExamples/dist/lib. To run this application from the command line without Ant, try: java -jar "/home/toma/NetBeansProjects/GUIFormExamples/dist/GUIFormExamples.jar" jar: Connecting to 192.168.1.122:22 Connecting to 192.168.1.122:22 cmd : mkdir -p '/home/toma/NetBeansProjects//GUIFormExamples/dist' Connecting to 192.168.1.122:22 done. profile-rp-calibrate-passwd: Connecting to 192.168.1.122:22 cmd : cd '/home/toma/NetBeansProjects//GUIFormExamples'; '/usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java' -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:39245 -Dfile.encoding=UTF-8 -jar /home/toma/NetBeansProjects//GUIFormExamples/dist/GUIFormExamples.jar Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.(Window.java:535)