You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Daniel Schregenberger <np...@gmx.ch> on 2004/05/11 22:01:20 UTC

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


Re: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
Hello!

> just took a short look at the document. Very interesting approach.

Yes. I think after reading the first two chapters you know the concept,
the rest are proofs and deeper toughts about it.

> > > afaik java.lang.Object is something like another primitive type. I.e. in
> > > the jvm there are value types and there is one reference type which is
> > > java.lang.Object. As all other classes are derived from this one,
> > > variables having a type of class xyz are also treated as references.
> > > That's the only thing I do know which might create a need to bind this
> > > class tightly to the jvm and cause trouble if you add references into
> > > java.lang.Object itself.
> >
> > I noticed that the GNU classpath project had a note about this. ie: when
> > you use GNU classpath for your own VM, you have to implement some stuff
> > in your VM.
> > But our goal is (was?) to use a standard VM.
> 
> I got that from a very good book about jvm internals:
> Java Virtual Machine by Matthias Kalle Dalheimer
> Published by O'Reilly in 97. ISBN of the German Print:
> 3-930673-73-8

Thanks for the hint. I'll try to find a copy of this book and see if it
provides me with some information that might help.

> > > BTW: Why the hell should anybody have to modify this class? Would be very
> > > interesting to know.
> >
> > I'm implementing dynamic Type checking for the Universe Type System.
> > This is a way of making sure object structures don't leak and nobody
> > outside can modify anything inside and break invariants. Here's a link
> > to a paper if you're interested:
> >
> > http://sct.inf.ethz.ch/publications/papers/MuellerPoetzsch-Heffter01a.pdf
> >
> > > There might also be some ways to solve your problem...
> >
> > Yeah, it looks as if I have to think of one :)
[...]
> A way I do use to fool about references in a persistency/network access api is 
> to replace the original class f.e. Address with an own class which does 
> implement all interfaces of the original and offer all operations of it. The 
> original class is relocated to f.e. AddressSubject or another package. So a 
> "new Address()" creates in fact an instance of the replaced class which will 
> also cause the creation the original (if needed, i.e. when it is accessed the 
> first time). All calls to the instance are routed (maybe over the network) to 
> the original class or do end up in modifications of database table fields. 
> Like this you do have the possibility to step in between. I do use bcel for 
> these modifications but a precompiler could do the same. 

Modifying java.lang.Object would be easier I think.
I think I would have to wrap all JDK classes and the bootstrap problem
would be present again. (see below why I need all JDK classes to have
that attribute)

> I assume that you do need a (pre)compiler for your extensions because you also 
> did extend the java syntax. A simple way to implement instance access control 

There is a compiler, yes. It's not yet published as there's still much
work to do.

> would be that the precompiler adds "this" as first parameter to all calls. So 
> it could transfer "Address myAddress = new Address()" to "Address myAddress = 
> new Addres(this)" and "myAddress.setStreet(...)" to 
> "myAddress.setStreet(this, ....)". Your replacement of Address would now have 
> a hook to set the owner of an instance or to check if the caller is allowed 
> to perform the operation he wants to perform.

The information I need is a field containing the owner of the universe
the object is in.
To be fully usable, we need this info on every object, also the ones in
the JDK. If I got your idea right, this will not work for me.
I think I will use a hashtable that can be accessed over a static
function or something like that.

> Hope that you will find a solution as this looks _very_ useful to hackers like 
> me :-).

Yeah, I hope so too :)

-- Daniel


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


Re: Modification of java.lang.Object

Posted by Mark Breuer <as...@heavy-metal.de>.
Hi,

just took a short look at the document. Very interesting approach.

On Thursday 13 May 2004 00:54, Daniel Schregenberger wrote:
> Hello
>
> > afaik java.lang.Object is something like another primitive type. I.e. in
> > the jvm there are value types and there is one reference type which is
> > java.lang.Object. As all other classes are derived from this one,
> > variables having a type of class xyz are also treated as references.
> > That's the only thing I do know which might create a need to bind this
> > class tightly to the jvm and cause trouble if you add references into
> > java.lang.Object itself.
>
> I noticed that the GNU classpath project had a note about this. ie: when
> you use GNU classpath for your own VM, you have to implement some stuff
> in your VM.
> But our goal is (was?) to use a standard VM.

I got that from a very good book about jvm internals:
Java Virtual Machine by Matthias Kalle Dalheimer
Published by O'Reilly in 97. ISBN of the German Print:
3-930673-73-8


>
> > BTW: Why the hell should anybody have to modify this class? Would be very
> > interesting to know.
>
> I'm implementing dynamic Type checking for the Universe Type System.
> This is a way of making sure object structures don't leak and nobody
> outside can modify anything inside and break invariants. Here's a link
> to a paper if you're interested:
>
> http://sct.inf.ethz.ch/publications/papers/MuellerPoetzsch-Heffter01a.pdf
>
> > There might also be some ways to solve your problem...
>
> Yeah, it looks as if I have to think of one :)
>
>--Daniel

OK :-)  - anything I know about access control to instances (maybe you already 
know this stuff):
In J2EE and in JSDK implementations access control to instances of "modules" 
(i.e. anything running in the same Servlet Context) is restricted by the use 
of specific class loaders for each modules. So, there is a global class 
loader which loads the types for all Servlet Contexts and a special one for 
each Servlet Context. Each Servlet may just access Types which are loaded by 
its own class loader or by a superordinated class loader. Modules in J2EE 
work the same way. So, you may restrict the access to certain Types by 
creating a class loader for each module. Whenever somebody from outside tries 
to access a instance of this module, a ClassNotFoundException is thrown.
Some other more sophisticated possibilities are offered by the 
SecurityManager. You may define restriction policies based on java packages. 
But I dont know how that exactly works and what it can do.
So you might create a class for each universe where an instance of a type will 
occur and let the universe run in it's own class loader and the interface 
type to this univers in the superordinated class loader. The result would be 
that you will lose a lot of memory because the same code might appear in lot 
of class files. On the other hand it is not possible to implement the 
difference between a RW and a RO access to an object, so this approach doesnt 
fit the needs.

A way I do use to fool about references in a persistency/network access api is 
to replace the original class f.e. Address with an own class which does 
implement all interfaces of the original and offer all operations of it. The 
original class is relocated to f.e. AddressSubject or another package. So a 
"new Address()" creates in fact an instance of the replaced class which will 
also cause the creation the original (if needed, i.e. when it is accessed the 
first time). All calls to the instance are routed (maybe over the network) to 
the original class or do end up in modifications of database table fields. 
Like this you do have the possibility to step in between. I do use bcel for 
these modifications but a precompiler could do the same. 

I assume that you do need a (pre)compiler for your extensions because you also 
did extend the java syntax. A simple way to implement instance access control 
would be that the precompiler adds "this" as first parameter to all calls. So 
it could transfer "Address myAddress = new Address()" to "Address myAddress = 
new Addres(this)" and "myAddress.setStreet(...)" to 
"myAddress.setStreet(this, ....)". Your replacement of Address would now have 
a hook to set the owner of an instance or to check if the caller is allowed 
to perform the operation he wants to perform.

Hope that you will find a solution as this looks _very_ useful to hackers like 
me :-).

Cya,

Mark


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


Re: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
On Don, 2004-05-13 at 14:40, David Hovemeyer wrote:
> On Thu, May 13, 2004 at 12:54:41AM +0200, Daniel Schregenberger wrote:
> > > There might also be some ways to solve your problem...
> > 
> > Yeah, it looks as if I have to think of one :)
> 
> You might want to consider using Jikes RVM instead of Sun's JVM:
> 
>   http://www-124.ibm.com/developerworks/oss/jikesrvm/
> 
> It uses GNU classpath as its runtime library.  With the complete source
> code to both the VM and the runtime, you should be able to make
> the changes you require.

I know about Jikes and the GNU classpath, but the project goal is to use
a standard VM. Modifications of the (boot)classpath are acceptable
'cause they can be automated (with batch files or shellscripts).

-- Daniel


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


Re: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
On Die, 2004-05-18 at 16:28, Todd Wright wrote:
> > > What I'm doing is to put all the objects in a hash table.  That means
> > > you can associate whatever info you want with them.  You have to
> > > make sure that you use System.identityhashcode and the == operator,
> > > you have to use weak references (unless you don't mind no garbage
> > > collection occurring) and you have to be careful that your own
> > > objects (eg the WeakReferences themselves) don't get put into the
> > > system.
> > >
> > > Apart from that it's quite simple.  :-)
> >
> > I was thinking about this approach too. There's a high probability that
> > I will try it this way now.
> > Thanks for pointing out the difficult parts!
> 
> I wrote something like this using BCEL without VM changes.  It's all open 
> source:
> 
> Offline I modify all class constructors to register the newly created instance 
> in a table, using WeakReferences to allow GC:
>   http://profiler.cougaar.org/#design
> For and overview and snapshots, see:
>   http://profiler.cougaar.org/
> I implemented a table that's quite similar to your design:
> http://cougaar.org/cgi-bin/viewcvs.cgi/profiler_impl/src/org/cougaar/profiler/InstancesTable.java?rev=HEAD&cvsroot=profiler&content-type=text/vnd.viewcvs-markup
> 
> It was discussed on the "advanced-java" mailing list:
>    
> http://discuss.develop.com/archives/wa.exe?A2=ind0312&L=ADVANCED-JAVA&T=0&I=-3&P=1321
> 
> Since the above discussion I've fixed several limitations, such as String and 
> Thread tracking.  Some "java.lang" classes are still out of reach due to the 
> VM:
>   Class
>   Object
>   String$CaseInsensitiveComparator
>   java.lang.ThreadGroup
>   java.lang.Throwable
>   java.lang.ref.Reference
>   java.lang.ref.SoftReference
>   java.lang.ref.WeakReference     # since I use WeakReferences in my table!
> The Sun JVM ignores any modifications to Class, and Object is likely the same, 
> since it's partially built into the VM.  Also, there was a minor hurdle with 
> BCEL 5.1 and "java.math.BigInteger":
>   http://issues.apache.org/bugzilla/show_bug.cgi?id=18323
> 
> A more significant limitation is array tracking, since arrays lack a 
> constructor.  I've started a workaround to modify "newarray" clients, but 
> some of the largest arrays are inside the JVM (e.g. classfile bytecodes, 
> jars, string constants, etc).
> 
> I'd be happy to discuss the details and usage...

I don't have any of these problems, since I can put these things into
the compiler. I only have to be carefull with regards to GC. 

Thanks for your help!

-- Daniel


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


Re: Modification of java.lang.Object

Posted by Todd Wright <tw...@bbn.com>.
On Thursday 13 May 2004 15:02, Daniel Schregenberger wrote:
> On Don, 2004-05-13 at 14:56, Erik Corry wrote:
> > On Thu, May 13, 2004 at 08:40:31AM -0400, David Hovemeyer wrote:
> > > On Thu, May 13, 2004 at 12:54:41AM +0200, Daniel Schregenberger wrote:
> > > > > There might also be some ways to solve your problem...
> > > >
> > > > Yeah, it looks as if I have to think of one :)
> > >
> > > You might want to consider using Jikes RVM instead of Sun's JVM:
> >
> > What I'm doing is to put all the objects in a hash table.  That means
> > you can associate whatever info you want with them.  You have to
> > make sure that you use System.identityhashcode and the == operator,
> > you have to use weak references (unless you don't mind no garbage
> > collection occurring) and you have to be careful that your own
> > objects (eg the WeakReferences themselves) don't get put into the
> > system.
> >
> > Apart from that it's quite simple.  :-)
>
> I was thinking about this approach too. There's a high probability that
> I will try it this way now.
> Thanks for pointing out the difficult parts!

I wrote something like this using BCEL without VM changes.  It's all open 
source:

Offline I modify all class constructors to register the newly created instance 
in a table, using WeakReferences to allow GC:
  http://profiler.cougaar.org/#design
For and overview and snapshots, see:
  http://profiler.cougaar.org/
I implemented a table that's quite similar to your design:
http://cougaar.org/cgi-bin/viewcvs.cgi/profiler_impl/src/org/cougaar/profiler/InstancesTable.java?rev=HEAD&cvsroot=profiler&content-type=text/vnd.viewcvs-markup

It was discussed on the "advanced-java" mailing list:
   
http://discuss.develop.com/archives/wa.exe?A2=ind0312&L=ADVANCED-JAVA&T=0&I=-3&P=1321

Since the above discussion I've fixed several limitations, such as String and 
Thread tracking.  Some "java.lang" classes are still out of reach due to the 
VM:
  Class
  Object
  String$CaseInsensitiveComparator
  java.lang.ThreadGroup
  java.lang.Throwable
  java.lang.ref.Reference
  java.lang.ref.SoftReference
  java.lang.ref.WeakReference     # since I use WeakReferences in my table!
The Sun JVM ignores any modifications to Class, and Object is likely the same, 
since it's partially built into the VM.  Also, there was a minor hurdle with 
BCEL 5.1 and "java.math.BigInteger":
  http://issues.apache.org/bugzilla/show_bug.cgi?id=18323

A more significant limitation is array tracking, since arrays lack a 
constructor.  I've started a workaround to modify "newarray" clients, but 
some of the largest arrays are inside the JVM (e.g. classfile bytecodes, 
jars, string constants, etc).

I'd be happy to discuss the details and usage...

Todd

>
> -- 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


Re: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
On Don, 2004-05-13 at 14:56, Erik Corry wrote:
> On Thu, May 13, 2004 at 08:40:31AM -0400, David Hovemeyer wrote:
> > On Thu, May 13, 2004 at 12:54:41AM +0200, Daniel Schregenberger wrote:
> > > > There might also be some ways to solve your problem...
> > > 
> > > Yeah, it looks as if I have to think of one :)
> > 
> > You might want to consider using Jikes RVM instead of Sun's JVM:
> 
> What I'm doing is to put all the objects in a hash table.  That means
> you can associate whatever info you want with them.  You have to
> make sure that you use System.identityhashcode and the == operator,
> you have to use weak references (unless you don't mind no garbage
> collection occurring) and you have to be careful that your own
> objects (eg the WeakReferences themselves) don't get put into the
> system.
> 
> Apart from that it's quite simple.  :-)

I was thinking about this approach too. There's a high probability that
I will try it this way now.
Thanks for pointing out the difficult parts!

-- Daniel


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


Re: Modification of java.lang.Object

Posted by Erik Corry <er...@arbat.com>.
On Thu, May 13, 2004 at 08:40:31AM -0400, David Hovemeyer wrote:
> On Thu, May 13, 2004 at 12:54:41AM +0200, Daniel Schregenberger wrote:
> > > There might also be some ways to solve your problem...
> > 
> > Yeah, it looks as if I have to think of one :)
> 
> You might want to consider using Jikes RVM instead of Sun's JVM:

What I'm doing is to put all the objects in a hash table.  That means
you can associate whatever info you want with them.  You have to
make sure that you use System.identityhashcode and the == operator,
you have to use weak references (unless you don't mind no garbage
collection occurring) and you have to be careful that your own
objects (eg the WeakReferences themselves) don't get put into the
system.

Apart from that it's quite simple.  :-)

-- 
Erik Corry

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


Re: Modification of java.lang.Object

Posted by David Hovemeyer <da...@cs.umd.edu>.
On Thu, May 13, 2004 at 12:54:41AM +0200, Daniel Schregenberger wrote:
> > There might also be some ways to solve your problem...
> 
> Yeah, it looks as if I have to think of one :)

You might want to consider using Jikes RVM instead of Sun's JVM:

  http://www-124.ibm.com/developerworks/oss/jikesrvm/

It uses GNU classpath as its runtime library.  With the complete source
code to both the VM and the runtime, you should be able to make
the changes you require.

-Dave

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


Re: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
Hello

> afaik java.lang.Object is something like another primitive type. I.e. in the 
> jvm there are value types and there is one reference type which is 
> java.lang.Object. As all other classes are derived from this one, variables 
> having a type of class xyz are also treated as references. That's the only 
> thing I do know which might create a need to bind this class tightly to the 
> jvm and cause trouble if you add references into java.lang.Object itself.

I noticed that the GNU classpath project had a note about this. ie: when
you use GNU classpath for your own VM, you have to implement some stuff
in your VM.
But our goal is (was?) to use a standard VM.

> BTW: Why the hell should anybody have to modify this class? Would be very 
> interesting to know. 

I'm implementing dynamic Type checking for the Universe Type System.
This is a way of making sure object structures don't leak and nobody
outside can modify anything inside and break invariants. Here's a link
to a paper if you're interested:

http://sct.inf.ethz.ch/publications/papers/MuellerPoetzsch-Heffter01a.pdf

> There might also be some ways to solve your problem...

Yeah, it looks as if I have to think of one :)

-- Daniel


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


Re: Modification of java.lang.Object

Posted by Mark Breuer <as...@heavy-metal.de>.
Hi,

afaik java.lang.Object is something like another primitive type. I.e. in the 
jvm there are value types and there is one reference type which is 
java.lang.Object. As all other classes are derived from this one, variables 
having a type of class xyz are also treated as references. That's the only 
thing I do know which might create a need to bind this class tightly to the 
jvm and cause trouble if you add references into java.lang.Object itself.
BTW: Why the hell should anybody have to modify this class? Would be very 
interesting to know. 
There might also be some ways to solve your problem...

Cya,

Mark

On Tuesday 11 May 2004 22:01, Daniel Schregenberger wrote:
> 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


RE: Modification of java.lang.Object

Posted by Daniel Schregenberger <np...@gmx.net>.
On Mit, 2004-05-12 at 02:26, Kevin Myers wrote:
> 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

Just what I did here...the VM crashes whenever I add a field. Methods
are ok.

> 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.

Hmmm...right...didn't think of that yet...that's bad...

> 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.

Thanks for the tip, I'll definately think about it.

-- Daniel


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


RE: Modification of java.lang.Object

Posted by Kevin Myers <ke...@vt.edu>.
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