From: Rushabh D. <ra...@pe...> - 2007-06-20 21:52:49
|
Thanks Bartek - I tried to hack around the classloader and use the instrumentMIDletClasses flag to turn off instrumentation - but to no avail. I'll hack around some more and see what I can do; otherwise, I could just restructure my code to not do various package private things that it is currently doing - this is ugly, but doable. Note that this is not the case for running the final jar through micro - this happens when I'm developing and running code from eclipse on micro. At that stage, the project naturally has a bunch of jars which have not been collapsed into one, however micro still tries to do funny class loading and things break. -Rushabh -----Original Message----- From: ba...@gm... [mailto:ba...@gm...] On Behalf Of Bartek Teodorczyk Sent: Tuesday, June 19, 2007 6:26 AM To: Rushabh Doshi Cc: mic...@li... Subject: Re: [Microemulator-users] Classloading changes in 2.0.1? Hi, Indeed, we changed classloading method in 2.0.1. Mostly because we wanted to fix some core library incompapilities beetween Java ME and Java SE and we started to use ASM bytecode intrumentation software for that purpose. Your example is a side effect of that change. However we designed new classloader code to be compatible with MIDP packaging scheme (jad/jar). Your example doesn't fit into that standard. If you want to change that behaviour look into the following parts of MicroEmulator code: 1. microemu-javase/src/main/java/org/microemu/app/Common.java public static void openJadUrl(String urlString) public static void openJadUrl(String urlString, MIDletClassLoader midletClassLoader) protected void loadFromJad(String jadUrl, MIDletClassLoader midletClassLoader) 2. microemu-javase/src/main/java/org/microemu/app/classloader/MIDletClassLo ader.java Bartek Teodorczyk 2007/6/18, Rushabh Doshi <ra...@pe...>: > > > > Hey folks, > > Did the classloading get changed in 2.0.1 onwards? Here is the symptom, I > haven't yet dug into exactly what is going on: > > I have Base.jar with namespace com.company which contains package private > class Package.class > > I have Dependent.jar with namespace com.company which contains class > App.class which reference Package.class. > > Note that this is perfectly valid (two jars with the same namespace > accessing package private classes). > > This works fine in micro-2.0.0 but fails with IllegalAccessError in 2.0.1 > and 2.0.2-SNAPSHOT. > > Does someone know off the top of their head what is going on? If not, I can > dig further into this issue. > > Thanks! > -Rushabh > > -- > > Rushabh Doshi > > http://keeda.stanford.edu/~radoshi > > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Microemulator-users mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/microemulator-users > > |