Tris said:
I am looking for someone who has run some of the examples in this book.
I cannot get one of the first projects to work. I keep gettting a stack
error running the ObjectCreationMonitoring example. I ( and others )
believe there is a recursion problem. The modification to the Object
class seems a little suspect. Also, changing the stack size did not
help.
Sorry, I haven't read the book but if you post a small example someone
will comment on it.
--
Sincerely,
Tris Orendorff
[Q: What kind of modem did Jimi Hendrix use?
A: A purple Hayes.]
Thanks for the response,
Originally I was trying to get an object monitor to work. This required
modifying the java.lang.Object class. When I ran this I received a
stack error. So to test where the error occured I removed the
monitoring app and replaced it with a simple hello world. Using the new
Object I still recieved the stack error. Again to remove any reference
to the monitoring code I removed the one line of code used for the
Object Monitor. I replaced it with a System.out.println(...). I still
received the error. So after all that, this is the additonal code I
added to the Object class
public Object(){
this(true);
System.out.println("java.lang.Object");
}
public Object(boolean b)
{
}
What I have found is that if I do not use a class, something derived
from Object, there is no problem. In other words, If I use:
int x;
x = 1 + 2
there is no error. But if I use
Integer x = 2;
Boom! StackError.
One last thing, I am invoking the app with the following command line
java -Xbootclasspath/p:ObjectHack.jar;rt.jar tuning.HelloWorld
(the java.lang.Object class is obviously in ObjectHack.jar)
So that the deal.
thanks again