In one of my previous posts, I talked about how the Android API lacks support for java.beans package and I outlined some possible solutions to it. Turns out that Apache Harmony has java.beans package implemented under Apache license which means you can port and use these classes in Dalvik, as long as you have the license information in the source code. So, that’s the route I took and for those interested in where the code is it’s under /classlib/modules/beans/src/ of Apache Harmony source download.
does it works for you? lots of classes in java.beans has reference to the org.apache.harmony.beans.internal.nls.Messages which has a reference to the org.apache.harmony.kernel.vm.VM to get the resource bundle. How did you get pass that? Thanks.
For now, I changed this line:
final ClassLoader loader = VM.bootCallerClassLoader()
To this:
final ClassLoader loader = null; // VM.bootCallerClassLoader()
In attempting to use the Apache Harmony version of java.beans, I have run into two problems:
1) Did you repackage java.beans? (I.e., rename the package, see http://code.google.com/p/dalvik/wiki/JavaxPackages).
2) How did you handle the appearance of classes from java.awt (like java.awt.Image) within java.beans? (java.awt is also mostly not present in Android.)
Has anyone got this to work? A link to compiled beans.jar would be awesome 🙂
do we have a beans.jar yet 🙂
Hi, I have hit the same issue and I would like to know if anyone has found something. As same as Charles, my show-stopper is that some classes that Introspector depends on, has a dependency on java.awt.Image.
have same problem for rome
found this
http://code.google.com/p/android-rome-feed-reader/
its a kind of repackaging rome and java.bean, works great
it cannot work!!!
here the log :
Dx 1 error; aborting
Conversion to Dalvik format failed with error 1
waiting for your help,thanks
here’s a link to the elusive “beans.jar”.
http://code.google.com/p/openbeans/downloads/detail?name=openbeans-1.0.jar