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