[ann] new version of jad decompiler plugin available

Hey Folks,

I just uploaded a new version of the jad decompiler plugin ideajad. Changes are only minor...

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

Enjoy,

-hendrik

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon

0
9 comments
Avatar
Permanently deleted user

I'm having some trouble configuring this to operate the way I expected
it to. Unless you want the decompiled source code mixed in with your own
source, you have to configure a separate source directory. You then
configure the plug-in to output there. However, when you do this, IDEA
now treats this directory like other source directories and tries to
compile any code it finds in there. I don't want it to try and compile
decompiled code, so I add it to the "excludes" list (Project
Properties/Paths/Exclude). But when you do this, the plug-in stops
working (I think it decompiles but it won't go to the decompiled class
afterwards).

Hendrik Schreiber wrote:

Hey Folks,

I just uploaded a new version of the jad decompiler plugin ideajad.

> Changes are only minor...


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

Enjoy,

-hendrik

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon


0
Avatar
Permanently deleted user

You're almost right, but you have to add the decompiled source directory to
be excluded in the compile settings, not the path settings.

N.

news.intellij.net wrote:

I'm having some trouble configuring this to operate the way I expected
it to. Unless you want the decompiled source code mixed in with your
own source, you have to configure a separate source directory. You
then configure the plug-in to output there. However, when you do
this, IDEA now treats this directory like other source directories
and tries to compile any code it finds in there. I don't want it to
try and compile decompiled code, so I add it to the "excludes" list
(Project Properties/Paths/Exclude). But when you do this, the plug-in
stops working (I think it decompiles but it won't go to the
decompiled class afterwards).

>

Hendrik Schreiber wrote:

>> Hey Folks,
>>
>> I just uploaded a new version of the jad decompiler plugin ideajad.

> Changes are only minor...

>>
>> => http://www.tagtraum.com/ideajad.html
>>
>> Enjoy,
>>
>> -hendrik
>>
>> IdeaJad 691.1
>> =============
>> - Added support for decompiling whole jars
>> - Added icon


0
Avatar
Permanently deleted user

thanks, nathan for setting that straight.

-hendrik

0
Avatar
Permanently deleted user

Hendrik Schreiber wrote:

Hey Folks,

I just uploaded a new version of the jad decompiler plugin ideajad. Changes are only minor...

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

Enjoy,

-hendrik

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon

Hi Hendrik,

did you include my fixes for making it work on Linux ?

Edo

0
Avatar
Permanently deleted user

Hi Edo,

no, I didn't (cause I don't know what they are), but I'd love to!
can you help me out? what did you change?

-hendrik

0
Avatar
Permanently deleted user

One tiny suggestion:
My preference is to make the decompiled files read-only (File.setReadOnly)

Hendrik Schreiber wrote:

Hey Folks,

I just uploaded a new version of the jad decompiler plugin ideajad. Changes are only minor...

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

Enjoy,

-hendrik

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Avatar
Permanently deleted user

Hendrik Schreiber wrote:

Hi Edo,

no, I didn't (cause I don't know what they are), but I'd love to!
can you help me out? what did you change?

-hendrik


Hi Hendrik,

I copy and paste below this message I posted last November ...
Edo

Hi

if you try IdeaJad on linux, you will find it doesn't work.

First trivial thing is that the zip doesn't contain the jad executable marked as such.

(I don't know if creating a zip with the x attribute is possible in
windows). you need to chmod +x it


The second more serious thing is that it comes up with a dialog complaining it can't decompile.

To debug it, I found necessary to add some debug in the
Jad.decompile(...) method.
Hendrik please consider adding a debug option in code ;)

as the returned stream is unused, just copy the process out to the parent system out/err.

if you plan to use the stream in a next version, maybe use a TeeStream
whose second destination
(System.out/err is used on debug active ?).


public InputStream decompile(JadOptions options, String files)

throws IOException, InterruptedException {

String _command = execPath + options.toString() + " " + files;
System.out.println(_command);
Process p = Runtime.getRuntime().exec(_command);
ByteArrayOutputStream out = new ByteArrayOutputStream();
new StreamPumper(p.getErrorStream(), System.err).start();
new StreamPumper(p.getInputStream(), System.out).start();
p.waitFor();
return new ByteArrayInputStream(out.toByteArray());
}


this way it complains about not finding the class file

the solution is pretty simple: the quotes used to enclose the class file and the directory are NOT enjoyed by JAD.

the same command works fine if pasted in a shell, but when Runtime.exec runs, there is no shell to parse the command line.

So, if the method is changed to

public InputStream decompile(JadOptions options, String files) throws IOException, InterruptedException {
String _command = execPath + options.toString() + " " + files;
_command = _command.replace('"',' ');
System.out.println(_command);
Process p = Runtime.getRuntime().exec(_command);
ByteArrayOutputStream out = new ByteArrayOutputStream();
new StreamPumper(p.getErrorStream(), System.err).start();
new StreamPumper(p.getInputStream(), System.out).start();
p.waitFor();
return new ByteArrayInputStream(out.toByteArray());
}

it works well on linux.
I will uplaod a pathced jar on the wiki, hoping that the next version be will be linux friendly.

thanks for a great plugin, anyway!

Edo


0
Avatar
Permanently deleted user

So does anyone know how to decompile the whole jar?
Haven't found anything to do that yet...

Hendrik Schreiber wrote:

Hey Folks,

I just uploaded a new version of the jad decompiler plugin ideajad. Changes are only minor...

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

Enjoy,

-hendrik

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Avatar
Permanently deleted user

In Classpath view, right-click the jar and select decompile.

"Erb" <dont@evenbother.com> wrote in message
news:b13p40$abl$1@is.intellij.net...

So does anyone know how to decompile the whole jar?
Haven't found anything to do that yet...

>

Hendrik Schreiber wrote:

Hey Folks,

>

I just uploaded a new version of the jad decompiler plugin ideajad.

Changes are only minor...

>

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

>

Enjoy,

>

-hendrik

>

IdeaJad 691.1
=============
- Added support for decompiling whole jars
- Added icon

>

>
>

--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>


0

Please sign in to leave a comment.