|
-
Jul 25th, 2003, 12:01 AM
#1
Thread Starter
Dazed Member
javap
Is there anyway i can run the disassembler and get a human readable version of the whole .class file. If the disassembler is run a human readable verson of the API defined by the specified class is produced. If javap is run with the -c switch the API is produced along with the byte code. The API is readable but the byte code is somewhat hard to interpret.
-
Jul 25th, 2003, 06:57 AM
#2
Bytecode? Isn't it bytecode assembly?
Assembly is hard to interpret, that's a fact. There are some java decompilers on the web, try searching for them on google.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 25th, 2003, 07:07 AM
#3
jad is the best I know, unfortunatly its location is a tripod member page that is unavailable most of the time.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 25th, 2003, 12:31 PM
#4
Thread Starter
Dazed Member
It dosen't look like Assembly. Try disassembling a .class file using javap. Tell me what you think.
C:\jdk1.3\bin> javap -c -classpath C:\Dirs; Class
-
Jul 25th, 2003, 12:33 PM
#5
Fanatic Member
DJDecompiler is great. It takes a class file and turns it into the original .java file. If you're interested, let me know. Later, Jeremy
He who listens well, speaks well.
-
Jul 27th, 2003, 04:17 PM
#6
Code:
Method void init()
0 getstatic #3 <Field java.io.PrintStream out>
3 ldc #4 <String "Initializing">
5 invokevirtual #5 <Method void println(java.lang.String)>
8 aload_0
9 invokevirtual #6 <Method java.awt.Rectangle getBounds()>
12 getfield #7 <Field int width>
15 istore_1
16 aload_0
17 invokevirtual #6 <Method java.awt.Rectangle getBounds()>
20 getfield #8 <Field int height>
23 istore_2
24 aload_0
25 iload_2
26 iload_1
27 multianewarray #9 dim #2 <Class [[B>
31 putfield #2 <Field byte arHeight[][]>
34 aload_0
35 aload_0
36 invokevirtual #10 <Method java.net.URL getCodeBase()>
39 ldc #11 <String "asg.png">
41 invokevirtual #12
<Method java.awt.Image getImage(java.net.URL, java.lang.String)>
Well, if that doesn't look like assembly I don't know what does.
Always the same scheme:
ByteOffset OpCodeName [Parameters]
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 27th, 2003, 08:03 PM
#7
Thread Starter
Dazed Member
Honestly i dont know what Assembler looks like. It all looks like scribble to me.
-
Jul 27th, 2003, 10:44 PM
#8
Frenzied Member
Originally posted by CornedBee
Well, if that doesn't look like assembly I don't know what does.
Always the same scheme:
ByteOffset OpCodeName [Parameters]
It's bytecode.
Take a look at http://www.mozilla.org/projects/ef/t.../examples.html to see an example of java source code and the corresponding bytecode and x86 assembler code.
-
Jul 28th, 2003, 01:06 AM
#9
No, it's assembly. Bytecode would be just that, bytecode. It would look the same as machine code. This is bytecode assembly, and it looks very much like other assembly, especially MMX or SSE assembly (the normal x86 instruction have only 2, 3 or 4 letters).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 28th, 2003, 09:23 AM
#10
Frenzied Member
Bytecode is the machine language of the VM, not the platform on which it is running. If it were true machine code you wouldn't need the JVM to convert your .class files.
-
Jul 28th, 2003, 11:42 AM
#11
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 1st, 2003, 10:05 PM
#12
Thread Starter
Dazed Member
Yeah CornedBee is right in the respect that it is Assembly. I just didn't recognize it at first since im not use to looking at Assmbler code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|