Showing posts with label awt. Show all posts
Showing posts with label awt. Show all posts

Tuesday, November 29, 2011

Why Android does not support fully java.beans package

Some, or at least one, classes of java.beans package rely on the java.awt package e.g. PropertyEditor. As stated in an issue, Android can not support the java.awt package.

The uncomplete support of java.beans package causes that various libraries relying on this package can not be used as is e.g. Springframework or Log4j. Also see why Log4j does not work in Android and why Spring does not work in Android.

Add support for more JDK classes to Android

The idea is to repackage JDK classes into another package namspace. The repackaging is not enough, since the relying libraries on the original JDK packages must also be changed/repackaged. So the follwoing steps are needed in theory.

  1. repackage JDK libraries
  2. refactor and repackage libraries relying on (repackaged) JDK classes

Unfortunately in case of java.beans package would not be enough, since the repackaged JDK classes would still depend on java.awt package.

You should follow me
on twitter