Monday, January 14, 2013

How to install JD-GUI on Ubuntu 64 bit

JD-GUI is the best Java decompiler around.

However, it requires 32bit gtk libraries. Otherwise it gives the error: "error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory"

So, to run it on a 64bit Ubuntu we can install the ia32-libs-gtk package [1].
apt-get install ia32-libs-gtk
We can further add it to the Nautilus 'open with' pop-up and then make it the default app to open .class files. Adding an app to that pop-up is explained here[2].

After that is done, we can open any .class file from JD-GUI; even within jar files.

Ref:
[1] http://lunduke.com/forum/discussion/126/ubuntu-12-04-64bit-error-while-loading-shared-libraries-libgtk-x11-2-0-so-0/p1
[2] http://dulanja.blogspot.com/2013/01/how-to-add-program-to-nautilus-open.html

12 comments:

Anonymous said...

Thanks.

Anonymous said...

Very useful. Thank you.

Anonymous said...

Cool! Thank you so much! It's a very helpful tip!

Anonymous said...

Thanks - this helped. Silly architecture issues.

Michael Quinnjr said...

I've been killing myself for hours thinking it was just a user permissions thing or possibly just a oversight on my part (which in this case it is.). Appreciate the tip, now I can decompile this math parser so I can extract some code to use in my program so, I can distribute a jar without worrying about external libraries.

dulanja said...

Thanks. Glad this helped you all :)

Anonymous said...

Another saved soul. TYVM

Mathieu Hicauber said...

Thanks a lot.

Anonymous said...

FYI, on Ubuntu 13.10, I had to follow these steps instead:
$ sudo apt-get install libgtk2.0-0:i386 libxxf86vm1:i386 libsm-dev:i386

Anonymous said...

Thank you very much!

Anonymous said...

Here is what I needed with Ubuntu 14.04:

apt-get install libc6:i386 libgtk2.0-0:i386 libxxf86vm1:i386 libsm-dev:i386 libstdc++6:i386

Anonymous said...

Cool, it worked like a charm