Skip to content

Instantly share code, notes, and snippets.

@thistehneisen
Created January 23, 2024 15:30
Show Gist options
  • Save thistehneisen/942b19d9df7f7f92a77cc33468d0b5d6 to your computer and use it in GitHub Desktop.
Save thistehneisen/942b19d9df7f7f92a77cc33468d0b5d6 to your computer and use it in GitHub Desktop.
Decompiles all jar files in current directory recursively
#!/bin/bash
output_dir="decompiled"
mkdir -p "$output_dir"
find . -name "*.jar" -exec sh -c '
for jarfile do
decompile_dir="$0/$(basename "${jarfile}" .jar)"
mkdir -p "$decompile_dir"
jd-cli "$jarfile" -od "$decompile_dir"
done
' "$output_dir" {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment