Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Problem with decompiler

Thread view: 
f.pallaro@libero.it - 11 Oct 2005 14:01 GMT
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.
Thomas Fritsch - 11 Oct 2005 14:20 GMT
> I decompiled a jar with jad, but I found this in the code:
>
[quoted text clipped - 3 lines]
>  e;
> ..
[...]

> What can be?
May be a bug in jad. Consider reporting it to the jad-developer?
<http://www.kpdus.com/jad.html>

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

Tor Iver Wilhelmsen - 11 Oct 2005 16:58 GMT
> 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.
Roedy Green - 11 Oct 2005 23:19 GMT
>What can be?
If you want an answer you will have to let people look at the code.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Chris Uppal - 12 Oct 2005 12:18 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.