George2 0 Junior Poster

Hello everyone,


I want to load the binary content of a .class file in a dynamic approach. In more detail, I want it to work in the following approach. When given the name of a class, I can retrieve the binary content of the .class file. I have written the following sample but it does not work. Can anyone help to find what is wrong with my sample? How to achieve my goal?

String className = this.getClass().getName();
InputStream inputStream = this.getClass().getResourceAsStream (className);

When executing the above code, the inputStream is always returned as "null".


Thanks in advance,
George