Need a good, free Java decompiler

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Franke
    Veteran Member
    • Feb 2007
    • 2641
    • Chapel Hill, NC
    • Ryobi BT3100

    #1

    Need a good, free Java decompiler

    Any recommendations? I've got some class files that don't seem to match what I see in the java files...

    Thanks!
    online at http://www.theFrankes.com
    while ( !( succeed = try() ) ) ;
    "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates
  • JSUPreston
    Veteran Member
    • Dec 2005
    • 1189
    • Montgomery, AL.
    • Delta 36-979 w/Biesemyere fence kit making it a 36-982. Previous saw was BT3100-1.

    #2
    I picked up a real nice Mr. Coffee at a church yard sale a month ago for $3.

    Oh, you mean the OTHER java. I had to do some stuff in it for a class while getting my Master's degree. Most miserable programming class I've ever had.

    I found one using Google. Think it was a 30 day trial, which was plenty enough for me. Sorry I don't remember the name off the top of my head.
    "It's a dog eat dog world out there, and I'm wearing Milk-Bone underwear."- Norm (from Cheers)

    Eat beef-because the west wasn't won on salad.

    Comment

    • Alex Franke
      Veteran Member
      • Feb 2007
      • 2641
      • Chapel Hill, NC
      • Ryobi BT3100

      #3
      Originally posted by JSUPreston
      I found one using Google. Think it was a 30 day trial, which was plenty enough for me. Sorry I don't remember the name off the top of my head.
      I found a few searching Google but the all seem to be circa 2000, so the "that just don't seem right" flag went up. Either the technology hasn't changed since then, or I'm missing something silly.
      online at http://www.theFrankes.com
      while ( !( succeed = try() ) ) ;
      "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

      Comment

      • Alex Franke
        Veteran Member
        • Feb 2007
        • 2641
        • Chapel Hill, NC
        • Ryobi BT3100

        #4
        I'm going to give JAD a try on a Linux virtual with eclipse. We'll see how it goes...

        http://en.wikipedia.org/wiki/JAD_(JAva_Decompiler)
        online at http://www.theFrankes.com
        while ( !( succeed = try() ) ) ;
        "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

        Comment

        • cgallery
          Veteran Member
          • Sep 2004
          • 4503
          • Milwaukee, WI
          • BT3K

          #5
          Originally posted by Alex Franke
          I'm going to give JAD a try on a Linux virtual with eclipse. We'll see how it goes...

          http://en.wikipedia.org/wiki/JAD_(JAva_Decompiler)
          Let us know. It would be interesting to see the output.

          Comment

          • Alex Franke
            Veteran Member
            • Feb 2007
            • 2641
            • Chapel Hill, NC
            • Ryobi BT3100

            #6
            Originally posted by cgallery
            Let us know. It would be interesting to see the output.
            Looks like it worked reasonably well, but it's pretty clearly decompiled java... lots of goto's and labels, and some meaningless stuff. Plus there are these troubling "MISSING_BLOCK_LABEL" entries...

            I couldn't get it to work using the eclipse plugin, though. I think the class viewer still tries to open the file even though I set the JAD plug-in to be the default for the *.class extension. But it worked okay from the command line.

            Here's an example of the output:

            Code:
                protected void deleteDuplicateADEntries()
                {
                    String filterPrefix;
                    if(!doFindDuplicates || doDebug && db_adLoops <= 0)
                        return;
                    filterPrefix = "(&(objectclass=user)(employeeID=*";
                    int i = 0;
            _L6:
                    LDAPSearchResults sr;
                    if(i >= 100)
                        break MISSING_BLOCK_LABEL_342;
                    String filter = filterPrefix;
                    if(i < 10)
                        filter = (new StringBuilder()).append(filter).append("0").toString();
                    filter = (new StringBuilder()).append(filter).append(Integer.toString(i)).toString();
                    filter = (new StringBuilder()).append(filter).append("))").toString();
                    LDAPConnection L = getAdUserConnection();
                    sr = L.search(adUserBase, adUserScope, filter, ADConst.gcAttribs, false, adUserSearchConstraints);
            _L4:
                    LDAPEntry nextEntry;
                    if(!sr.hasMore())
                        break MISSING_BLOCK_LABEL_326;
                    nextEntry = sr.next();
                    if(!doDebug) goto _L2; else goto _L1
            _L1:
                    if(db_adLoops <= 0)
                        return;
                    db_adLoops--;
            _L2:
                    numAD++;
                    LDAPAttribute attrib = nextEntry.getAttribute("employeeID");
                    trace((new StringBuilder()).append("deleteDuplicateADEntries() does this user have a contact? --> (").append(numAD).append(")  ").append(nextEntry.getDN()).toString());
                    if(attrib != null)
                    {
                        String pid = attrib.getStringValue();
                        String matchFilter = (new StringBuilder()).append("(employeeID=").append(pid).append(")").toString();
                        String dn = findInADContacts(matchFilter);
                        if(dn != null)
                        {
                            numAD_dup++;
                            trace("deleteDuplicateADEntries() *** found User with duplicate Contact ***");
                            deleteFromADContacts(pid, dn);
                        }
                    }
                    if(true) goto _L4; else goto _L3
            _L3:
                    i++;
                    if(true) goto _L6; else goto _L5
            _L5:
                    Exception e;
                    e;
                    e.printStackTrace();
                }
            online at http://www.theFrankes.com
            while ( !( succeed = try() ) ) ;
            "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

            Comment

            • cgallery
              Veteran Member
              • Sep 2004
              • 4503
              • Milwaukee, WI
              • BT3K

              #7
              Thanks. Decompiled code always gives interesting insight into how the compiler works.

              Comment

              Working...