IdeaJad problem

When I right-click and try to decompile a jar I get two errors. First "java.io.IOException: Failed to extract zip/jar-file from path: D:/projekt/bungy/lib/log4j-1.2.6.jar". And then "Failed to find & open decompiled file."

I'm using IDEA build 693 and ideajad-691-1. I have had IdeaJad working before so maybe it's a incompatibility-problem.

Bye,
Dag Welinder

17 comments

Hm - that's weird. Have you checked whether you can open the jar with winzip or jar on the command line. Is there an entry (possibly a stacktrace) in the idea.log in your home directory?

-hendrik

When I right-click and try to decompile a jar I get
two errors. First "java.io.IOException: Failed to
extract zip/jar-file from path:
D:/projekt/bungy/lib/log4j-1.2.6.jar". And then
"Failed to find & open decompiled file."

I'm using IDEA build 693 and ideajad-691-1. I have
had IdeaJad working before so maybe it's a
incompatibility-problem.

Bye,
Dag Welinder


0

I can open the jar-file with wincip. I have tried with other jars too, of course. And there's no stacktrace in the idea-log.

I tried the latest IdeaJAd-version too, but still getting the same problem.

Bye,
Dag.

0

Dag,

can you please post the jar. I'd like to give it a try on my machine.

-hendrik

0

Ok, I'll post the jar. However, I'm quite sure there's no problem with the file, since I tried with several other files and got the same problem.

This is the standard Log4j-jar.

Bye,
Dag.



Attachment(s):
log4j-1.2.6.jar
0

Hi Dag,

I found a problem with readonly flags and fixed it.
Can you please try out the attached jar (just replace the one in ideajad's lib dir).

Thanks,

-hendrik



Attachment(s):
ideajad.jar
0

what I forgot: please make sure your decompile dir is empty and NOT set to readonly.

-hendrik

0

I'm having the same problem with other jars. Every one I've tried has failed. I'm using Idea build 676 and Ideajad-691-2. I also tried the jar Hendrik attached in this thread, but it made no difference. My decompile dir is empty and not read only. My idea.log file doesn't contain anything related to this.

thanks

john

0

Ok - I did some digging and found a number of other problems. Please try out the attached jar. I want to make sure it works this time, before I make a new release.
Unfortunately I was not able to exactly reproduce the problem, but we'll see...

Thanks guys, for checking this out,

-hendrik

Note:

In the configuration you can also set the option 'Mark decompiled files as readonly'. Please note that when you set this option, a second decompilation might fail, because jad cannot overwrite a readonly file. The corresponding errormessage is something like:
"JavaClassFileOutputException: Can't create file `D:\ixxx.java'"
If this happens you have to manually remove the readonly property of the existing java files.

Also there is now more output in idea.log.



Attachment(s):
ideajad.jar
0

Ok, it seems to working quite well now!

I still get the "Failed to open & extract decompiled file", but all the src-files are there!

There might be a problem with large jar-files. I tried a few different jars and the small ones worked well, but the two big ones (>250kb) produced the error visible in the attached screenshot. I will also attach a file containing the end of the idea.log.

Bye,
Dag



Attachment(s):
error.PNG
idea.log
0

Another slight problem: If a jar has the extension ".JAR" instead of ".jar" the menu-item Decompile is inactive.

Dag.

0

Dag,

in the dialog that was shown in your screenshot - was there one or more lines not starting with "Parsing...". You may have to scroll up for them. Those lines may also be in your idea.log (before the stacktrace).

They could give you & me a hint about went wrong.

-hendrik

0

I just posted a new version on the website.

=> http://www.tagatrum.com/ideajad.html

I hope that fixes all issues.

-hendrik

0

correct link :)
http://www.tagtraum.com/ideajad.html

-rh-

"Hendrik Schreiber" <hs@tagtraum.com> p??e v diskusn?m p??sp?vku
news:7843716.1045185826187.JavaMail.jrun@is.intellij.net...

I just posted a new version on the website.

>

=> http://www.tagatrum.com/ideajad.html

>

I hope that fixes all issues.

>

-hendrik



0

Ooops - thanx for fixing this!

-hendrik

0

Hello,
I still get "Failed to open & extract decompiled file" in ideajad-691-3. I think the problem is that the passed parameters to jad conflict with my JAD_OPTIONS environment variable. From the log file I see that you call jad with '-r' for example. I noticed that the decompiled file wasn't created with the correct package structure. The jad readme.txt states that this option format reverses the value of an option. Perhaps you should pass the options in the '-r+' format. As a workaround I cleared the JAD_OPTIONS variable in the idea startup script.

Regards,
Arvid

0

Hi,

are you maybe getting: "Failed to find & open decompiled file."?

That should be fixed in the next version. Thanks for pointing me to the '-r+' syntax.

-hendrik

0

Yes, I got the message you mentioned -- I was just too stupid to copy the right one from the thread... Thanks for providing the plugin.

Arvid

0

Please sign in to leave a comment.