944,204 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 4020
  • Java RSS
Dec 22nd, 2004
0

How to load binary content of a .class file?

Expand Post »
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?

Java Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Java Doc help
Next Thread in Java Forum Timeline: How to make a thread never be terminated?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC