Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Syntax & Programs / Re: Simple integer division question on: November 15, 2009, 12:57:14 pm
yes
2  Forum 2005-2010 (read only) / Interfacing / Re: 0017 libraries with java serial example on: November 15, 2009, 09:24:29 pm
Resolved.  Amateur mistake; tried to construct an instance of the PrefsHack library when the method I was trying to get at was static (and there was no constructor anyways).
3  Forum 2005-2010 (read only) / Interfacing / 0017 libraries with java serial example on: November 15, 2009, 12:58:01 pm
There are a few examples showing how to implement a serial connection in java using the Processing libraries to talk to the arduino.

http://www.arduino.cc/playground/Interfacing/Java
http://silveiraneto.net/2009/03/01/arduino-and-java/

But, it seems that Preferences.init() has been changed for 0017.  I did find a work around. (See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251256638 )

I added the PrefsHack class as instructed, but as magitek described in that post I too get a bunch of NullPointerExceptions.

Code:
Exception in thread "main" java.lang.NullPointerException
        at processing.app.Preferences.getDefault(Preferences.java:788)
        at processing.app.Preferences.getFont(Preferences.java:874)
        at processing.app.Preferences.<init>(Preferences.java:372)
        at serialtest.PrefsHack.<init>(PrefsHack.java:14)
        at serialtest.Main.main(Main.java:58)
Java Result: 1
Anyone know how to get around this? Is there any documentation for the Processing libraries?
Pages: [1]