Thanks to the open source Unimotion library by Lincoln Ramsay, I have developed a java native interface that allows access to the Apple Sudden Motion Sensor available in powerbooks (and macbooks) since 2005.
Download the library sms.zip. Source code for unimotion.c and Unimotion.java is contained in the src directory.
History of Motion
Written by Christian Klein
JNI Implementation of motion by Dave Chatting
Modified for iBook compatibility by Pall Thayer
Modified for Hi Res Powerbook compatibility by Pall Thayer
Modified for MacBook Pro compatibility by Randy Green
Disparate forks unified into UniMotion by Lincoln Ramsay
Made into a Java Native Interface by Daniel Shiffman