Recaf Documentation
repository·master·Indexed 27 days ago
https://github.com/col-e/recafA modern Java bytecode editor for standard Java and Android applications. Recaf abstracts complexities like constant pools and stack frame calculations, providing features for decompilation, bytecode assembly, deobfuscation, and runtime instrumentation. It supports extensibility via scripts and plugins, a headless mode for server-side use, and a command line interface.
What's inside Recaf
- Recaf includes a minified dependency specifically for reading Kotlin Metadata. This is a subset of a much larger dependency, provided to minimize footprint while maintaining the ability to parse Kotlin metadata.
Use provided libraries for non-standard Maven hosts
masterIn scenarios where required libraries are not hosted on standard Maven repositories, Recaf provides specific libraries directly within the project structure to ensure availability.Set up Recaf development environment
masterTo develop on Recaf, clone the repository and use either an IDE or Gradle.
Using an IDE
- Import the project using the
build.gradlefile. - Create a run configuration using the main class
software.coley.recaf.Main.
Using Gradle (No IDE)
Run the build command to generate the executable JAR.
Output location:
recaf-ui/build/libs/recaf-ui-{VERSION}-all.jar- Import the project using the
Download Recaf
masterRecaf can be obtained through the following methods:
- Launcher: Use the Recaf-Launcher for installation and usage instructions.
- Snapshot releases: Available via CI actions.
- Independent releases: Check the official releases page.
Extend Recaf with Scripts and Plugins
masterRecaf's functionality is exposed through modular APIs. You can automate behaviors or add new features using two methods:
- Scripts: For automating specific behaviors.
- Plugins: For more complex scenarios and registering hooks into the APIs.
For implementation details, refer to the developer documentation under the "plugins & scripts" section.
Launch Recaf in Headless Mode
masterTo run Recaf without a graphical user interface (e.g., for scripting or server-side use), use the headless mode flag provided by theLaunchCommandparser. In headless mode, Recaf performs a restricted classpath discovery (Bootstrap.enableCoreOnlyDiscovery()) to avoid loading UI-related services, making it suitable for platform-independent distributions that lack JavaFX bundles.Run Recaf via Command Line
masterRecaf supports running as a command line application. This is particularly useful when providing scripts at startup. To view all available launch arguments, run the application with the--helpflag.--help