How do I view the contents of a .class file (java byte code)?
How do I open these type of files in Linux? I'm using Centos 5.8.
Using javap. The Java command-line comes with the javap tool that displays information about the fields, constructors, and methods of a class file. Based on the options used, it can disassemble a class and show the instructions that comprise the Java bytecode.
The JDK comes with javap which is a tool to disassemble the byte code inside a class file. Editing on byte code level is possible. Have a look at BCEL, a java library designed to read, manipulate and write class files.
class without source default to Class Decompiler Viewer . Now, click on the class or methods, press F3 , and the plugin will automatically decompile the Java class.
javap -c X
will show the disassembly of X.class
.
javap -v com.company.package.MainClass
To understand bytecode You can use this list of mnemonics
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With