DatePicker on Java 7

Johan Vos johan at
Wed Dec 3 08:55:40 UTC 2014


I have the DatePicker control running on Android now. Since DatePicker is a
heavy user of JSR 310, which is only available in Java 8, it required lots
of work on the compat.jar we use on Android. The compat.jar is the jar
where we put classes in order to provide required Java 8 API's and it is
developed in . I consider
everything there "temporal" until we have full Java 8 support on Android.

I added a bunch of java datetime classes in the compat.jar, mainly based on
the threeten backport by Stephen Colebourne (see

Unfortunately, there were 2 issues I couldn't fix without changing the code
in the datepicker control:
1) Android has a Locale class, but no Locale.Category. I coudn't find an
easy way to add an inner class in the compat.jar with the main class being
available in the Dalvik runtime
2) No support for static interface methods in Dalvik:
Chronology.ofLocale(...) won't work there.

I managed to keep the diff rather small, but still I hope to get it at 0
differences. Below is a link to the diff (ignore the changes in

- Johan

More information about the openjfx-dev mailing list