Loader
Yee Keat MOEY
james at igelaus.com.au
Mon Jan 8 22:02:02 PST 2001
Hi,
I am currently using Kaffe 1.06 on Linux RedHat 6.2.
I look through the classMathod.h file in kaffe/kaffevm directory. I notice
that in Hjava_lang_Class struct contain a Hjava_lang_ClassLoader
attribute. I try to access that attribute but it always contain (nil).
######## Source Code ##########
.........
straceInfo = (stackTraceInfo*) buildStackTrace(0);
for (i = 1; i <= 6; i++) {
printf("Method %i Name %s\n", i, findMethodFromPC(straceInfo[i].pc)->name->data);
myclass = findMethodFromPC(straceInfo[i].pc)->class;
printf("Class Name %s\n", myclass->name->data);
protect = myclass->loader;
printf("Loader address %p\n", (void *) myclass->loader);
}
..........
########################
########### OUTPUT ###########
Method 1 Name m5
Class Name Testing
Loader address (nil)
Method 2 Name m4
Class Name Testing
Loader address (nil)
Method 3 Name m3
Class Name Testing
Loader address (nil)
Method 4 Name m2
Class Name Testing
Loader address (nil)
Method 5 Name m1
Class Name Testing
Loader address (nil)
Method 6 Name main
Class Name Testing
Loader address (nil)
##############################
Am I accessing it the wrong way OR Is it not implmented yet ? I have try
to use a few different way to load the Testing class.
- Class.forName() method
- URLClassLoader object
- new Testing()
but none of them return anything except (nil)
thank in advance
More information about the kaffe
mailing list