classunloadevent doesn't seem to occur

Hi,

I am having trouble with the classunloadevent. basically it doesn't seem to occur. I have created it in the typical way (see below) but it doesn't seem to occur. Could someone explain why.

private String[] excludes = {"java.*", "javax.*", "sun.*",

"com.sun.*"};

ClassUnloadRequest cur = erm.createClassUnloadRequest();

for (int i=0;i<excludes.length;++i){

cur.addClassExclusionFilter(excludes);

}

cur.enable();

I look for the event in another class file like below

}else if(inEvent instanceof ClassUnloadEvent){

System.out.println("picked it up\t");

>

[653 byte] By [mary_murphya] at [2007-9-28 10:49:14]
# 1

2.17.8 Unloading of Classes and Interfaces of The Java Virtual Machine Specification says:

"A class or interface may be unloaded if and only if its class loader is unreachable. The bootstrap class loader is always reachable; as a result, system classes may never be unloaded."

http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#32202

VitalyPa at 2007-7-12 0:58:01 > top of Java-index,Archived Forums,Debugging Tools and Techniques...