Foreword
If you update to Java 11 or higher you don’t have to do any of this. Recaf will automate the entire process for you. If you wish to continue using Java 8, follow along below.
Requirements
- A JDK that bundles JavaFX
- Allowing Recaf to access the JDK’s compiler/attach-api
JavaFX
Recaf’s UI is built using JavaFX. Please make sure that the version of Java 8 that you have installed bundles JavaFX. Known supported vendors are:
- Azul’s ZuluFX
- Bellsoft’s Liberica (Full JDK package)
Allow Recaf to access the compiler and attach-api
Recaf has some features that depend on developer tools that come with Java. To unlock these features make sure to configure the local Java 8 installation properly. Some notes first:
- You must have a Java Development Kit installed (JDK)
- The JDK includes the required files to enable Recaf’s compiler access
- If you have a Java Runtime Environment (JRE) installed and not a JDK, please install a JDK instead.
To enable these features navigate to the directory that the JDK 8 is installed to ($JDK_DIR
). Copy the following files to the given location:
$JDK_DIR/lib/tools.jar
–>$JDK_DIR/jre/lib/ext/tools.jar
$JDK_DIR/lib/sa-jdi.jar
–>$JDK_DIR/jre/lib/ext/sa-jdi.jar
Verification
You can verifiy that Recaf is fully supported by opening the “System information” window under the “Help” menu.
The “Java” section of the “System information” window has two values that should both be listed as true
:
- “Supports compiler”
- “Supports attach”