__Java __ __ Decompiler __ that hits on the command line and outputs the result on the command line.
A Java decompiler that can also compile Java 5 and later class files, which are also used in Eclipse. (Reference) To JD Project JD-CLI uses the core library JD-Core used in that JD.
Go to here ["Jd-cli-windows-1.0.0.zip"] in Assets (https://github.com/jd-wrapper/jd-cli/releases/download/v1.0.0/jd-cli-windows-1.0 Download the .0.zip "DL") zip file. After thawing, the contents look like this. From the command line, you can get the result with jd-cli [file you want to decompile]. Other options are as follows
> jd-cli.exe -h
example:
jd-cli(.exe) Example.class
jd-cli(.exe) -b example.jar org.aaa.Example.class
jd-cli(.exe) -b org\aaa Example.class
usage:
classes... : Specify the class files...
-b (--base) VAL : Specify the reference directory or Jar file.
-h (--help) : Show helps. (default: false)
-l (--loc) : Show full classpath. (default: false)
-m (--meta) : Show metadatas.(e.g. Filename, Java versions..) (default:false)
-n (--line) : Show Line Number. (default: false)
-r (--real) : Realignment Line Number. (default: false)
-u (--unicode) : Escapes Unicode Charset. (default: false)
There is a folder called WinMergePlugins in the unzipped folder, and if you follow it, there are two types of folders, one for exe and one for jar. For example, the contents of For exe are as follows If WinMerge is installed, running install.bat in the folder with administrator privileges will copy it to the installed folder. After that, please check by deploying the plug-in in WinMerge.
Below is the result of comparing commons-lang3-3.10 and commons-lang3-3.11 of the latest common-lang3. It is automatically expanded and compared in about 87013ms (317 files). (By the way, the Jar version is 85174ms. It seems that it is about 10ms faster per file. If you have java8 or more and the path is passing, the Jar version may be faster.
JD-ECLIPSE Look at the source and respect the good points. I also brought it as it is. (Of course, the license part will not be erased.) The full path of the file name was the default, so all files will be caught when diffing. Fixed to support non-full path versions. Also, the replacement process when UNICODE was included in the file path was incorrect, so I fixed it. (Resolved the path like org / util / reader becoming org // til / reader)
The following is a digression, but ...
I checked it when I made it, and I made it because it wasn't there, but there were people who had already done the same thing. .. ..
kwart/jd-cmd jd-cmd - Command line Java Decompiler
Almost the same idea as it is not converted to exe. Is it more sophisticated because you can change the output pattern? Well, please use it properly. .. ..
I made it with reference to Gradle of JD-GUI, so actually check out the source
gradlew build
Then, both Linux version and OSX version will be output. But I haven't tested it, so I haven't put it out before. Somehow it seems to have a GUI-specific option.
Java related (or rather the article itself) update after a long time. I started with the desire to compare classes with WinMerge. There was a predecessor at the very end, and I was crazy I learned a lot about minifying the jar, executing it with launch4j, and zipping it with distributions. Everyone is amazing at using gradle. .. ..
Recommended Posts