Solved

Look at this Java Decompiler Problem!

Posted on 2002-04-02
14
191 Views
Last Modified: 2011-10-03
// FrontEnd Plus GUI for JAD
// DeCompiled : a.class

try {
       a1.pack();
       a1._mthtry(); //This Method Doesm't Exit At All!

       a1.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
} finally {
       a1.dispose();
}

The above code piece was decompiled by the Latest version of JAD/FrontEnd Plus. Actually, the methods begin with an underline char "_" (a1._mthtry(), e.g.) don't exit in the refered class (a1 here, e.g.), so this classes can't be compiled back into a .class after modification.

But it seems somebody else can decompile it successfully, what's the problem with the tools I am using? Or he use another better tool?

Could anyone tell me?
0
Comment
Question by:wyuanzheng
  • 6
  • 3
  • 2
  • +3
14 Comments
 
LVL 3

Expert Comment

by:shyamkumarreddy
ID: 6914964
Wyuanzheng,
I have some info for you. After you decompile your class file to java. It won't be 100 Percent back to java. And i don't think all compilers do that. If you can do that what is the way to hide your source right.

And the source which u get from class file is not the format in which u get it in java. It will be in some format and it is different for each decompilers and very very difficult to understand the logic and code.

And at the same time. There are some obsfucator for hiding the code also.

These are some info for you abt decompilers.
For more info look into sun for obsfucator.
Shyam
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6915047
Try JODE. Serach at google and you will find references to the opensource project hosted by sourceforge
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6915049
0
 

Author Comment

by:wyuanzheng
ID: 6915179
Sometimes, I see the decompiled class file contains some reserved words like "try", "null", "catch" as the Method name or Variable.

e.g.:

a1.try(a2.null);

//try() is a Method, null is an variable in a2 class

So, how to play with it?
0
 
LVL 9

Accepted Solution

by:
Ovi earned 50 total points
ID: 6915216
This means the class was obfuscated using a good obfuscating program. Normally you cannot solve this kind of problems. You could try to study the resulted sourcecode and fix'it if is understandable enough.
0
 

Author Comment

by:wyuanzheng
ID: 6915235
If I am required to decompile all the classes, and modify all the reference of these methods/variables, I must be mad! Any way else?
0
 

Expert Comment

by:alramanathan
ID: 6915316
U can try Decafe Pro which will decompile java Classes and but not in the Same format
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:alramanathan
ID: 6915318
It is available in http://decafe.hypermart.net/
0
 

Author Comment

by:wyuanzheng
ID: 6915430
decafe actually use JAD.
So the result will be the same with that decompiled by FrontEnd Plus. Best of all is FrontEnd is free while Decafe cost some.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6917263
Yes, you have right, is madness to change a obfuscate class. I don't think you have alternative solutions (perhaps only searching the web for another application like one you want to decompile).
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6917264
Yes, you have right, is madness to change a obfuscate class. I don't think you have alternative solutions (perhaps only searching the web for another application like one you want to decompile).
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6917265
Yes, you have right, is madness to change a obfuscate class. I don't think you have alternative solutions (perhaps only searching the web for another application like one you want to decompile).
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7932651
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: Ovi
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7984166
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
firstChar challenge 13 106
Saving Tweets with emojis using Twitter4J in a Mysql table 2 73
java. non-English characters encoding problem. intellij idea 3 73
factorial example 4 34
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now