Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34675
| From | Steven Simpson <ss@my.domain.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to write a URLClassLoader in Java such that it can execute a block of code prior to loading certain classes? |
| Date | 2016-06-20 11:01 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <pgrk3d-it3.ln1@s.simpson148.btinternet.com> (permalink) |
| References | <d51782b1-c257-4353-9295-a23bf31c0740@googlegroups.com> |
On 20/06/16 08:44, kant kodali wrote:
> @Override
> public Class loadClass(String name) throws ClassNotFoundException {
> I just want to execute a block of code say a print statement prior to loading certain classes and the above code doesn't quite work and I am not sure where the error is?
<http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html#loadClass-java.lang.String->
loadClass(String) just calls loadClass(String, boolean). It's possible
that the latter is being called directly, by-passing your override.
--
ss at comp dot lancs dot ac dot uk
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to write a URLClassLoader in Java such that it can execute a block of code prior to loading certain classes? kant kodali <kanth909@gmail.com> - 2016-06-20 00:44 -0700 Re: How to write a URLClassLoader in Java such that it can execute a block of code prior to loading certain classes? Steven Simpson <ss@my.domain.invalid> - 2016-06-20 11:01 +0100
csiph-web