Cfr-another java decompiler bulk decompile jar files (RPM)

Source: Internet
Author: User
Tags java decompiler

Cfr-another java decompiler bulk decompile jar files

Jd-gui is well known for the industry's proven anti-compilation prerequisites.

I am currently encountering a Java Project, Community Edition, want to do a localized version, ask the official, the official said closed source, helpless under can only decompile.

Faced with so many Jar,jd-gui to the anti-compilation Save, the workload is indeed very large. Fortunately, I found a good tool on the Internet.

High-energy warning: Jd-gui Anti-compilation of the wrong, you dare to put the CFR to decompile try to ensure that there are surprises.

Cfr-another Java Decompiler

Characteristics:

CFR would decompile modern Java Features-java 8 Lambdas (pre and Post Java Beta 103 changes),

Java 7 String switches etc, but was written entirely in Java 6.

Support Mainstream Java features-java 8 lambdas expression, java7 string switch, the main thing he was written in Java6, this is a bit bad.

The author also found that he can decompile the annotations of the class, Jd-gui cannot decompile, but the CFR is well. After a test, do not hesitate to include it in the Reverse Ordnance Library.

The use method is relatively simple, as follows:

Java-jar Cfr_0_121.jar Test.jar--outputdir c:/test

Run the above command to save the anti-compiled Test.jar code to the C:/test

I want to localize the software directory structure as follows

└─proj
├─actions
│└─aaa.jar
├─drawing.jar
├─favs.jar
├─feeders.jar
├─imex.jar
├─impl.jar
├─language.jar
├─option.jar
├─resources.jar
├─runtime.jar
├─test.jar
├─treelist.jar
└─view
├─editor.jar
├─progress.jar
└─startup.jar

If the above jar with Jd-gui manual anti-compilation work is very large, if the project is large, each anti-compilation will delay a lot of time.

So I wrote a batch processing Decompile.bat, can be used for bulk anti-compilation, the code is as follows:

You can drag a jar that needs to be deserialized separately to a batch file, and by default decompile all jars of the current directory and its subdirectories

@echoOffColor 17If "%1" = = "" (for/f "delims="%%i in ('dir/s/b/a-d/o-s *.jar ')Do (Echo is decompile%%~ni ...Title is anti-compilation%%i ...Java-jar D:\develop\java Reverse \cfr_0_122.jar "%%i"--caseinsensitivefs true--outputdir "%%~di%%~pi%%~ni"echo ----%%i has turned back---) goto : End) Else ( title is deserializing%1 ...  java-jar D:\develop\java Reverse \c Fr_0_122.jar %1--caseinsensitivefs true--outputdir "%~d1%~p1%~n1" echo decompile is complete. goto : End)Echo anti-compilation complete.  @pause>nul: Endpauseexit          

As long as you save the file, put it in the project root directory, run, each directory will be based on the jar file name generated a directory, which is the anti-compiled Java code.

Cfr-another java decompiler bulk decompile jar files (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.