Have you ever wondered to test your PI4J projects directly from your computer. Avoiding this routines of compile - copy into the pi - run?? Me to. This project is to allow precisely this: I've made a testing PI4J library so you can test your development from your computer.
Check this out:
It's my eclipse running a PI4J program, directly. The PI calls are packaged, sent over the network to the raspberry pi and there a server executes them, receives the answer and send the answer back to the computer.
This way, you can develop in your PC while the Pi stuff code is executed in the raspberry pi.
Start to work with TestPI4J is easy: you only have download two files in the files section of the project:
pi4jserver-1.0.zip. Or their Linux equivalents (with tgz extension).
Once you have downloaded these files, you have to install the server (pi4jserve-1.0.zip) in the raspberry PI: just unpack the contents in a folder and run the pi4jServer.sh file as root.
Back in your application, you have to replace the file pi4j-core.jar with the file testpicore.jar. In eclipse, you should remove from the classpath in Project → properties and add the new one.
Place the file
testPiCore.properties in the main directory of your project and configure it accordingly. That's it you have to do to start running you PI4J applications directly into your PC.