Problem with decompiler

F

f.pallaro

Hi,
I decompiled a jar with jad, but I found this in the code:

...
break MISSING_BLOCK_LABEL_344;
SQLException e;
e;
...

the MISSING_BLOCK_LABEL_344 is not defined.
I'm using Eclipse 3.1 and the third row ('e;') raised the error:
'Syntax error, insert "AssignmentOperator ArrayInitializer" to complete

Expression'.

What can be?

Thanks
F.
 
T

Tor Iver Wilhelmsen

What can be?

Try running javap -c on the class to see what the bytecode
instructions of the method do. The break will be implemented as a goto
there.
 
C

Chris Uppal

I decompiled a jar with jad, but I found this in the code:
[...]

JAD, like any decompiler, makes guesses about what source code will lead to
specific sequences of generated bytecode. So it depends on being able to
recognise the sequences that the compiler produces. If the compiler is changed
so that its output follows new patterns, then it's a matter of luck whether JAD
(or any other decompiler) will be able to recognise it.

Since JAD was last updated, which (as far as I know) was at around JDK1.3 time,
the compiler has changed a lot. One change is that try/finally blocks are
handled very differently; there are undoubtedly other changes. The final
effect is that JAD is not able to decompile everything into valid Java source.
When that happens it makes an attempt to make the problem obvious in the
"source" and carry on. That's what you are seeing here.

Personally, I find JAD perfectly adequate for my purposes even though it is a
bit out-of-date.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top