Coder Social home page Coder Social logo

Comments (14)

Storyyeller avatar Storyyeller commented on June 14, 2024

Do you think this should be the default behavior, or just a commandline switch?

from krakatau.

gist-github avatar gist-github commented on June 14, 2024

Having it as a command line switch would be nice as you ‎would know that there are issues with missing jar files and you want to override the default behaviour. Otherwise you wouldn't know you needed other jars until the whole decompilation was complete. It would also be nice to see a little report about the classes that it couldn't find, along with the class that was asking to use it. That way hopefully the user can track down the missing files/jars needed.However I still do think that the class you are decompiling when you encounter the ClassNotFoundException should be completely decompiled before exiting the application. I also tried the '-out' option when decompiling to a jar/zip file. But I couldn't get it to work. It would be nice if it did because decompiling obfuscated code contains the same filenames but with different case. This is not needed for case sensitive OS's like Linux, but for case insensitive OS's like Windows it would be a great benefit. Thanks for making a really cool piece of software. I appreciate your time. Justin. Sent from my BlackBerry 10 smartphone. From: StoryyellerSent: Thursday, October 3, 2013 6:52 PMTo: Storyyeller/KrakatauReply To: Storyyeller/KrakatauSubject: Re: [Krakatau] Gracefully handle ClassNotFound errors (#25)Do you think this should be the default behavior, or just a commandline switch?

—Reply to this email directly or view it on GitHub.

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

Outputting to a jar is something that I've long wanted but never got around to actually implementing.

Normally what I do in situations like this is to just change the filenames its writing to. It won't compile since the filename doesn't match the classname, but in a case like this, you're probably not going to be able to compile it anyway.

from krakatau.

gist-github avatar gist-github commented on June 14, 2024

Ok. Anyway of it detecting the duplicate and auto renaming the java file? Sent from my BlackBerry 10 smartphone. From: StoryyellerSent: Thursday, October 3, 2013 7:54 PMTo: Storyyeller/KrakatauReply To: Storyyeller/KrakatauCc: gist-githubSubject: Re: [Krakatau] Gracefully handle ClassNotFound errors (#25)Outputting to a jar is something that I've long wanted but never got around to actually implementing.

Normally what I do in situations like this is to just change the filenames its writing too. It won't compile since the filename doesn't match the classname, but in a case like this, you're probably not going to be able to compile it anyway.

—Reply to this email directly or view it on GitHub.

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

Well I'm not sure if there's a good way to detect duplicates. You could just hardcode a check for Windows and assume case sensitivity otherwise, but I'm not sure this is reliable.

Also, the problem is not just case. They could also make an invalid filename by using special characters or a name that's too long in which case it won't work on any OS (luckily, no obfuscator I know of actually does this).

from krakatau.

gist-github avatar gist-github commented on June 14, 2024

Understood. Good point. I appreciate you looking into this.  Sent from my BlackBerry 10 smartphone. From: StoryyellerSent: Thursday, October 3, 2013 8:04 PMTo: Storyyeller/KrakatauReply To: Storyyeller/KrakatauCc: gist-githubSubject: Re: [Krakatau] Gracefully handle ClassNotFound errors (#25)Well I'm not sure if there's a good way to detect duplicates. You could just hardcode a check for Windows and assume case sensitivity otherwise, but I'm not sure this is reliable.

Also, the problem is not just case. They could also make an invalid filename by using special characters or a name that's too long in which case it won't work on any OS (luckily, no obfuscator I know of actually does this).

—Reply to this email directly or view it on GitHub.

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

Krakatau now automatically resolves output filename collisions on Windows. If an invalid filename is detected, it uses a prefix plus the md5 instead.

Unfortunately, I don't have any easy way to test other platforms, but hopefully they still work.

from krakatau.

gist-github avatar gist-github commented on June 14, 2024

Nice. Can’t wait to try it.  Sent from my BlackBerry 10 smartphone. From: StoryyellerSent: Sunday, October 13, 2013 4:22 PMTo: Storyyeller/KrakatauReply To: Storyyeller/KrakatauCc: gist-githubSubject: Re: [Krakatau] Gracefully handle ClassNotFound errors (#25)Krakatau now automatically resolves output filename collisions on Windows. If an invalid filename is detected, it uses a prefix plus the md5 instead.

Unfortunately, I don't have any easy way to test other platforms, but hopefully they still work.

—Reply to this email directly or view it on GitHub.

from krakatau.

Shevchik avatar Shevchik commented on June 14, 2024

So, is ignoring classnotfound exception is going to be implemented?

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

Sorry, I forgot about this. Anyway, I'm not sure exactly what the desired behavior is. Should it just silently fail to decompile a file when a class not found error occurs?

Also one other note:

"Or be able to display the package/path of the Class it is trying to find so I can include it in the path."

Krakatau already does this and always has. In the particular case quoted, the class not found is "Callback", in the default package. You can often find the appropriate library by googling the classname and/or using sites such as findjar.

from krakatau.

Shevchik avatar Shevchik commented on June 14, 2024

In my case i'm trying to decompile a minecraft mod that has a tons of dependencies(but this mod can work without them), the other decompilers still decompiles the mod classes, but not his one, maybe there is a reason for that but i don't know.

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

So do you want it to just skip the affected classes entirely?

from krakatau.

Shevchik avatar Shevchik commented on June 14, 2024

I think yes.

from krakatau.

Storyyeller avatar Storyyeller commented on June 14, 2024

Ok, see if the new version does what you want. You can enable skipping by passing the -skip command line option to decompile.py.

I didn't have any examples handy to test, but it should work.

from krakatau.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.