調(diào)用IDEA反編譯整個(gè)Jar包
IDEA的反編譯插件https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler沒(méi)有在界面上沒(méi)有提供一次反編譯整個(gè)Jar包的功能乏沸,但可以通過(guò)他在命令行中調(diào)用他的工具類來(lái)反編譯整個(gè)Jar包調(diào)用IDEA的安裝目錄的"plugins\java-decompiler\lib\java-decompiler.jar"的org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler便可實(shí)現(xiàn).
例如java -cp "/Applications/IntelliJ IDEA.app/Contents/plugins/java-decompiler/lib/java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -dgs=true dacp-dp-executor-steps-guizhou-0.0.1-SNAPSHOT.jar mysrc
mysrc目錄下會(huì)有生成的整個(gè)Jar包的源文件(打成了jar,用zip解壓即可)其實(shí)是用fernflowerhttps://github.com/fesh0r/fernflower實(shí)現(xiàn)的