Fix Issue #12, remove dependency on Sun undocumented API, make it run on Android.