following image showing the error while running the JAVA GUI application.I use the following command to run the jar file by adding class path of the pi4j lib.
-
cannot see the image or the command used.– robMar 10, 2015 at 11:17
-
If you are programming GUI in Java, you might want to read about JavaFX. Everything I see says that JavaFX is the successor to Swing.– KolbanApr 3, 2015 at 14:01
1 Answer
This depends on what you want to do. It seems that the java program does not get access to a running X11 server. Do you run X11 on your pi? If so, then physically connecting keyboard, mouse and screen to it would probably solve your problem.
If you want the program running on the pi to use the X11-server of the machine you are running ssh from, then simply add the option -X
to your ssh
command, like so:
ssh -X pi@raspberrypi
and the pi will display the UI on your local machine.
-
Although that screenshot is in a GUI terminal, it could be an ssh session -- something the OP left ambiguous. So good point.– goldilocks ♦Mar 10, 2015 at 14:07