RSS

Android API and java.beans package #2

28 Sep

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.

About these ads
 
9 Comments

Posted by on September 28, 2010 in Android, Java

 

9 responses to “Android API and java.beans package #2

  1. arthur

    October 2, 2010 at 4:54 pm

    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.

     
  2. Mete

    October 21, 2010 at 5:10 am

    For now, I changed this line:

    final ClassLoader loader = VM.bootCallerClassLoader()

    To this:

    final ClassLoader loader = null; // VM.bootCallerClassLoader()

     
  3. Charles Gunn

    November 13, 2010 at 10:48 am

    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.)

     
  4. Nathan

    November 24, 2010 at 9:50 pm

    Has anyone got this to work? A link to compiled beans.jar would be awesome :)

     
  5. abhay

    June 9, 2011 at 10:45 am

    do we have a beans.jar yet :)

     
  6. skwok

    November 2, 2011 at 2:39 am

    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.

     
  7. bob

    November 5, 2011 at 6:37 pm

    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

     
  8. yongchang

    May 22, 2012 at 7:44 am

    it cannot work!!!
    here the log :
    Dx 1 error; aborting
    Conversion to Dalvik format failed with error 1
    waiting for your help,thanks

     
  9. MarioGarcia

    August 1, 2012 at 12:57 am

    here’s a link to the elusive “beans.jar”.

    http://code.google.com/p/openbeans/downloads/detail?name=openbeans-1.0.jar

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: