Page 1 of 1

How to use the ae-awt as a referenced library in my own Andr

PostPosted: Fri Jul 12, 2013 2:31 pm
by richardor.zh
If I want to use the ae-awt as a referenced library in my own Android project. What should I do?

I Just replaced the references, such as java.awt.Color into the ae.java.awt.Color.
when I run the android application. it says:

07-11 14:40:52.934: E/AndroidRuntime(8651): Caused by: java.lang.NoClassDefFoundError: sun.util.CoreResourceBundleControl
07-11 14:40:52.934: E/AndroidRuntime(8651): at ae.java.awt.Toolkit$1.run(Toolkit.java:1658)
07-11 14:40:52.934: E/AndroidRuntime(8651): at java.security.AccessController.doPrivileged(AccessController.java:45)
07-11 14:40:52.934: E/AndroidRuntime(8651): at ae.java.awt.Toolkit.<clinit>(Toolkit.java:1652)
07-11 14:40:52.934: E/AndroidRuntime(8651): ... 18 more
So how can I resolve this problem? I need your help.

Re: How to use the ae-awt as a referenced library in my own

PostPosted: Mon Jul 15, 2013 7:52 pm
by jason
Can you provide the class sun.util.CoreResourceBundleControl?

It must have been present when I built the jar, since it is imported at line4 of https://github.com/plutext/ae-awt/blob/ ... olkit.java ?

If you can't provide the class, you'll need to repackage it, and re-build ae-awt using your repackaged class.

Re: How to use the ae-awt as a referenced library in my own

PostPosted: Tue Jul 16, 2013 6:11 pm
by richardor.zh
jason wrote:Can you provide the class sun.util.CoreResourceBundleControl?

It must have been present when I built the jar, since it is imported at line4 of https://github.com/plutext/ae-awt/blob/ ... olkit.java ?

If you can't provide the class, you'll need to repackage it, and re-build ae-awt using your repackaged class.


Hi Jason,
I don't how to repackage the jdk source into android library. Just copy the source from rt.jar, then ant dist ??
What about the mean of rebuild ae-awt using repackaged class?
By the way, there are many static method, which invoke the static native initIDs(), such as https://github.com/plutext/ae-awt/blob/ ... Color.java
Does the anroid project need InitIDs()?

Thank you

Re: How to use the ae-awt as a referenced library in my own

PostPosted: Tue Jul 16, 2013 7:26 pm
by jason
1. Find the source .java file with suitable license
2. Copy it into the ae-awt source tree
3. Refactor to use target package name
4. Build

Beyond this, I'm afraid I can't help you, since its been a year or so since I've worked with this. Feel free to post here or on StackOverflow, and someone might help you, but you may need to be prepared to work it out for yourself. Good luck!