Note that the sun.arch.data.model property may also return unknown, so you may wish to handle this property as well. And whether this is portable - only on the systems you have compiled your JNI....