I have many problems in Java on the Nokia 9500 too. The programs works find in the emulator. But on the device its failed.
Mainly i thinks there is a BIG BUG by the java String-functions.
if you habe strings lower then 265 byte, its okay, but by strings
higher then 256 bytes, you get by the length-function always 256 or by using then indexOf-function for searching the string you get always 256 if the string you are looking for is on a position higher than 256.
This was testet by WSDD 5.6 and the newest nokia package