0017 libraries with java serial example

There are a few examples showing how to implement a serial connection in java using the Processing libraries to talk to the arduino.


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.

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?

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