jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Myers" <kemye...@vt.edu>
Subject RE: Modification of java.lang.Object
Date Wed, 12 May 2004 00:26:13 GMT
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:npfdd@gmx.ch] 
> Sent: Tuesday, May 11, 2004 4:01 PM
> To: bcel-user@jakarta.apache.org
> 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: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message