How to load binary content of a .class file?

Reply

Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

How to load binary content of a .class file?

 
0
  #1
Dec 22nd, 2004
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?

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

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


Thanks in advance,
George
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC