| | |
How to load binary content of a .class file?
![]() |
•
•
Join Date: Nov 2004
Posts: 189
Reputation:
Solved Threads: 0
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?
When executing the above code, the inputStream is always returned as "null".
Thanks in advance,
George
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)
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
![]() |
Similar Threads
- Problem in writing the content to a file line by line (Java)
- How to run/view .class file in java? (Java)
- class file in vb.net (VB.NET)
- Custom Class - File I/O (C++)
- Question about debugging .class file (Java)
- binary tree class (C++)
- How it is possible tu use a class that is in a new vb file?? (ASP.NET)
Other Threads in the Java Forum
- Previous Thread: Java Doc help
- Next Thread: GUI Window - Exit Button?
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array arrays automation bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse error fractal freeze ftp game gameprogramming givemetehcodez graphics gui health html ide image integer j2me j2seprojects java javac javaee javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux list login loops mac main map method methods mobile netbeans notdisplaying number online printf problem program project properties qt recursion researchinmotion rotatetext rsa scanner screen server set singleton sms sort sql string swing system textfields threads time title tree tutorial-sample update variablebinding windows working xor





