[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

skarzhevskyy do-not-reply at jboss.com
Tue Mar 4 12:09:13 EST 2008


I know that in J2SE it should not work!

BUT We are creating J2ME CLDC API classes!
The java/lang/Object.class should be created and written to the disk then it would be used to build MIDlet applications.

Created Object class is not used at runtime! The class is only used during J2ME build and it should have signature different from one in J2SE!

We have a process to create API stub classes. (No implementation classes only proper signature)  The classes signature is defined in XML and then exported to .classes using javassist.

Really need your help to solve this last outstanding problem!

Vlad

PS
http://www.microemu.org/ MicroEmulator is a pure Java implementation of Java ME in Java SE. The CLDC API classes is a subset of J2SE.

The open source project ProGuard has been updated to allow preverification of J2ME applications.  We are only one step from creating complete Open Source J2ME build process. The only missing point is LGPL or Apache CLDC API classes.

The phoneME classes can't be used because they are GPL. So we are creating the process to solve licenses problem. classes signature is not part of license so we need to create proper CLDC classes from signature.


PPS
  "it is not allowed in J2SE" Fine but this javassist code is working fine:
---
 klass = classPool.makeClass("java.lang.Object", null); 
 klass.writeFile("java/lang/Object.class");
---

 But the file created is not right!
 It creates "class Object extends Object"


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133994#4133994

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133994



More information about the jboss-user mailing list