I also needed to modify java.lang.Object for a class project. However as you have noted there are numerous problems when one encounters doing so. As an alternative I tried to modify java.lang.Object manually and update it using the -xbootpath options. However no matter how much I tried I could not get the JVM to load my modified version (and it does not provide appopriate diagnostic messages to fix it). During my search I found something much worse.... Modifying java.lang.Object (or any other file in rt.jar) is against the EULA that you most likely agreed to when you downloaded your JVM.
We are attempting an alternative now (and it is still in development, ill let you know how it comes out later if you wish).. Instead of modifying Object (or any other class in rt.jar) we redirect all reference to Object to a new class wrapped.java.lang.Object (wrapped.<oldclassname>) that is statically compiled and adds what we need. I hope this approach can suit your needs. Kevin > -----Original Message----- > From: Daniel Schregenberger [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 11, 2004 4:01 PM > To: [EMAIL PROTECTED] > Subject: Modification of java.lang.Object > > Hello! > > I have to modify java.lang.Object for a university project > and ran into several troubles: > > First the Class Construction Kit failed to do it, because it > insisted in writing java.lang.Object as Super Class, this > resulted in a circular dependency of course. > (btw: Several other tools failed the same way.) I then found > out about Jasmin, decompiled the class file, made my changes > there and compiled it again. After modifying Jasmin to write > NULL for the Super Class this works. > > The problem I'm stuck with now is: > I can't add any new fields. Even a simple Integer causes the > VM (I'm bound to the original one by SUN) to crash with a > NullPointerException or even a Segfault in a native library. > Functions work. Both, functions and fields also work for > other classes (like java.lang.String). > It seems java.lang.Object is coupled too tight with the VM... > > Has anyone any experience with this or nows of any project > that did something similar? Or can confirm that it's not > possible without touching the VM? > The (al)mighty googlebot didn't help me for once. :( > > Thanks for any help! > > -- Daniel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
