954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to load binary content of a .class file?

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

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You