after some strange queies to google and sun search i belive i have found my answer…
In the article:
http://java.sun.com/j2se/1.3/docs/guide/security/spec/security-spec.doc5.html
it is said that this is the order of determing which class loader is used:
-When loading the first class of an application, a new instance of the URLClassLoader is used.
-When loading the first class of an applet, a new instance of the AppletClassLoader is used.
-When java.lang.Class.ForName is directly called, the primordial class loader is used.
-If the request to load a class is triggered by a reference to it from an existing class, the class loader for the existing class is asked to load the class.
I believe the last point applies to me… am i correct in thinking that the existing class is the class i have just loaded via my custom classloader? If so then all the classes referenced in the loaded class will be asked to be loaded firstly by my custom classlader. Which is exactly what i want and so i will be able to include code in my custom class loader to load these referenced classes. Infact i think that little code will need to be added.
I will now try and implement a simple case to test this.