how to see byte code of a class on command prompt

by using which command can i see the bytecode of a class on command promptThanking in advance
[107 byte] By [upendraca] at [2007-10-3 3:31:50]
# 1
javap -help
jverda at 2007-7-14 21:25:54 > top of Java-index,Java Essentials,New To Java...
# 2
thanks to see your reply but as for as i know by using javap it shows all the construtors and methods prototype but it does not show bytecode
upendraca at 2007-7-14 21:25:54 > top of Java-index,Java Essentials,New To Java...
# 3

You want the actual bytes? Use any hex viewer/editor.

Or maybe you meant this: :; javap -classpath . Z

Compiled from "Z.java"

public class Z extends java.lang.Object{

public Z();

public void foo();

}

jeff@shinchan:/tmp 23:59:02

:; javap -classpath . -c Z

Compiled from "Z.java"

public class Z extends java.lang.Object{

public Z();

Code:

0:aload_0

1:invokespecial#1; //Method java/lang/Object."<init>":()V

4:return

public void foo();

Code:

0:iconst_0

1:istore_1

2:iload_1

3:bipush 100

5:if_icmpge21

8:getstatic#2; //Field java/lang/System.out:Ljava/io/PrintStream;

11: iload_1

12: invokevirtual#3; //Method java/io/PrintStream.println:(I)V

15: iinc1, 1

18: goto2

21: return

}

That's why I gave you -help, so that you could find out the details for yourself.

jverda at 2007-7-14 21:25:54 > top of Java-index,Java Essentials,New To Java...