JVMTIInterface jvmti = new JVMTIInterface();
HashMap map = jvmti.createIndexMatrix();
jvmti.exploreClassReferences(B.class.getName(),-1,true,true,true,true,false,map);
System.out.println(jvmti.exploreObjectReferences(map,b,1,true));
/*map=null;
jvmti.releaseTags();
System.out.println(jvmti.exploreObjectReferences(B.class.getName(),2,true)); */