Getting started
Installation
What HashGuard needs to run, how to get it and how to check that it works.
HashGuard is distributed as a command-line application and a Gradle plugin. Both run on the JVM.
Requirements
- A Java 25 runtime to run the CLI. The CLI itself is built with a Java 25 toolchain.
- Any JVM bytecode as input. The jars you protect do not need to target Java 25: string encryption keeps a fallback that Java 8 accepts.
- A licence key. Every run checks it before doing any work, see Licence.
Get HashGuard
Your download link is sent with your licence. It gives you the CLI distribution and, if you build with Gradle, the plugin.
Put the CLI on your PATH
The CLI distribution contains a bin folder with a launcher script for macOS and Linux and a .bat file for Windows. Unpack it somewhere stable and add that bin folder to your PATH:
export PATH="$HOME/tools/hashguard/bin:$PATH" Make sure JAVA_HOME points to a Java 25 runtime, or that java on your PATH is one.
Check that it runs
Run the CLI without arguments. It prints its usage and exits with code 2:
hashguard Usage: CliMain -config <config.json> [-input <in.jar>] [-output <out.jar>]
CliMain -config <config.json> -input <in.jar> -multislot 100 -outputdir <dir> -keysoutput <keys.json>
CliMain -licence-login [-licence-key <key>] Next, activate your licence on this machine.