I'm developing on a windows machine using netbeans (Currently looking into automatic deployment to the Pi through SSH).
So far I've built a little test program using the swing gui framework/toolkit. My next goal is to get this running on the Pi but I'm not really sure where to start. It's very easy to test on windows while developing, you just press the run button and your program pops up. However I'm scratching my head trying to get it to run on the Pi.
As I haven't set up the SSH deployment yet I'm just trying to run it off a USB stick. I assume you need to compile the java code and then run it in the same way as you do in this tutorial - http://www.savagehomeautomation.com/piface see below:
I'm using the same commands as above but with a different java file. It seems to compile fine but when I go to run it I get the following:
Code: Select all
cd /opt/pi4j/examples javac -classpath .:classes:/opt/pi4j/lib/'*' -d . PiFaceExample.java cd /opt/pi4j/examples sudo java -classpath .:classes:/opt/pi4j/lib/'*' PiFaceExample
Is this something to do with me not using the pi4j library in the program i'm trying to run? If someone could help me fathom what I need to do to get it to run that would be brilliant.
Code: Select all
Exception in thread "main" java.lang.NoClassDefFoundError: ContentEditor (wrong name: content/ editor/ContentEditor) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:792) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)