I have two examples of class files, one from an example Java application and one from an example C application (compiled into bytecode using LLJVM).
Having looked at their outputs, I see through javap -c -p that for initializing (static) fields, a Java application shows the following block:
static {}; Code: 0: sipush 1339 3: putstatic #7
This is essentially a <clinit> method, if I understand it. Or is detected as such using the virtual machine that I use.
The C-app has the following:
public {}; Code: 0: sipush 1339 3: putstatic #7
What is it? My virtual machine does not detect it.
Examples of class files. First, from a Java application that prints a message and waits 20 seconds, repeat. The second is a C application, which does roughly the same thing.
http://www.fast-files.com/getfile.aspx?file=156962
http://www.fast-files.com/getfile.aspx?file=156961
Apologize for this, I do not immediately know how to attach files or display .class files efficiently.
java jvm bytecode bytecode-manipulation jvm-bytecode
Sven
source share