Wednesday, February 18, 2009

javap




Java source compiled to into an intermediate bytecode (i.e .class file). Most of us have never seen it before. One way to view the byte code is to compile your class and then open the .class file in a hex editor and translate the bytecodes by referring to the virtual machine specification. JavaP convert the byte codes into human-readabl format.
tryout

javap java.io.DataInputStream

This helps very much for students. Because they don't get API or development IDE at the exam time. There is no way to check available API option with notepad and command prompt. Hope this will help.

tryout
javap -c JavapApplication

javap -classpath Specify where to find user class files
javap -extdirs Override location of installed extensions
javap -help Print this usage message
javap -J Pass directly to the runtime system
javap -l Print line number and local variable tables
javap -public Show only public classes and members
javap -protected Show protected/public classes and members
javap -package Show package/protected/public classes and members (default)
javap -private Show all classes and members
javap -s Print internal type signatures
javap -bootclasspath Override location of class files loaded by the bootstrap class loader
javap -verbose Print stack size, number of locals and args for methods. If verifying, print reasons

No comments: