Created
November 2, 2019 21:25
-
-
Save paulmallon/bea43c82f519eec2c6666521aed15f85 to your computer and use it in GitHub Desktop.
Jetbrains Java Console Decompiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$basePath = "C:\src\runtimeService-unpacked" | |
$targetPath = "c:\src\decompile" | |
$decompilerPath = "C:/Program Files/JetBrains/IntelliJ IDEA 2019.2.3/plugins/java-decompiler/lib/java-decompiler.jar" | |
$decompilerClass = "org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler" | |
Get-ChildItem $basePath *.class -Recurse | ForEach-Object { | |
java -cp $decompilerPath $decompilerClass ` | |
-hdc=0 -dgs=1 -rsy=1 -rbr=1 -lit=1 -nls=1 -mpm=60 ` | |
$_.FullName (split-path $_.FullName -Parent) | |
} | |
# copy decompiled code to destination | |
Copy-Item $basePath -filter *.java -Recurse -Destination $targetPath | |
# remove decompiled code in base dir | |
#Get-ChildItem $basePath *.java | Remove-item -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hdc = hide empty default constructor
dsg = decompile generic signatures
rsy = hide syntetic class members
rbr = hide brigde methods
lit = output numberic literal "as-is"
nls = define new line character to be used for outpu
mpm = max allowed processing time per deompile method
https://github.com/fesh0r/fernflower