![]() |
Java Decompiler (edit .jar files)
I've been through Google and back. What's a good editor in which I can edit .jar files (decompiler) of Java?
Thanks. (free to download, please) |
There is a difference between decompiling and editing a jar content.
A jar (java archive) as its name says is an archive or collection of java classes that are ready to be executed. A java decompiler is a tool that makes a reverse engineering from .class extension to .java extension. I do not know what is your need, anyway check how we solve both issues. For editing the content of the jar file (adding, removing, decompiling) you can go to the command prompt (or shell terminal for linux or unix based os) and on which you have installed the JDK not the JRE and you can write the following command: \etc\jdk\bin> jar and it will scroll down in front of you all the possible combinations of options on how to use jar (for example to explode the content of a jar you can write: jar -xvf (full path to jar file) On the other hand if you want to decompile a class file into a java file, you can download the jad (java decompiler) from the following url: http://www.softpedia.com/progDownloa...oad-85911.html |
I'm using Windows Vista 64-bit and that program you linked me too doesn't work. The screen flashes (cmd) for 1 sec and closes.
|
It is an exe file that should be called from command prompt.
After you explode your jar file into the following folder for example: com/test/MyClass.class you type: cd com cd test jad MyClass.class You need to make sure that jad.exe is in your classpath or in the same folder. Hope this helps besides you can simply go the command prompt and type jad and you will see a help how to use it |
But I have the .jar file. Inside it is a library of folders and iwant to edit Minecraft.class. How do i do that?
|
I already told you how.
Anyway you type jar -xvf jarfile.jar (make sure you are in the same folder where the jar file is) After that you search for your class in the hierarchy of folders and you into that folder and write: jad Minecraft.class You will have in the same folder now a file named: Minercraft.jad (simply rename it to Minercraft.java) |
I get:
-xvf is not a recognizable interneral or external command .. blah blah I had jad.exe in the same folder as minecraft-server.jar... :S |
the command is:
Code:
jar -xvf jarfile.jar
Another thing the command jar -xvf is to UNZIP the jar file. Please post here the command you are using as is to see what's wrong in it. |
I have both jdk 6 and jre 6 installed.
I have the .jar file on my folder. I don't know what you mean, though.. mkay i just got some folders with classes in 'em. We're off to a good start. How do I recompile them back to the .jar file edit: dangit, i just tried editing a .class file and all i got was random symbols. |
Code:
jar -cvf fileName.jar -C srcfolder/Code:
Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] fil |
Right o. What's a good free .class editor?
|
Personally I use Eclipse Galileo, it is not only a java text editor but an IDE oriented software (project based) so I think it will be complex for you.
If you want something simpler try this one: http://sourceforge.net/projects/eje/ It is built with Java I used to work on it a bit, but ideally Eclipse Galileo. |
I want to open .class files, not .java files. I tried opening .class files and I got:
http://i27.tinypic.com/n6febd.jpg Help? |
A class file is a compiled file so you cannot read its content.
By the way do you know java? Sorry for asking that but the minimum thing to know is that a java file compiles to .class file then the JRE transforms it into machine language and this is the property of java that makes it platform independant. |
I suggest that you start with this tutorial:
Code:
http://www.freejavaguide.com/corejava.htm |
| All times are GMT +1. The time now is 08:06 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.