1

enter image description herefollowing 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.

2
  • cannot see the image or the command used.
    – rob
    Mar 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.
    – Kolban
    Apr 3, 2015 at 14:01

1 Answer 1

2

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.

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.