Maven 3.6 or later - For building and running examples
Git - To clone the repository (optional)
Getting the Examples
Option 1: Clone from GitHub
Clone the repository to your local machine:
git clone https://github.com/groupdocs-redaction/GroupDocs.Redaction-for-Java.git
cd GroupDocs.Redaction-for-Java
Option 2: Download ZIP
Download the repository as a ZIP file from GitHub and extract it.
Installation
Navigate to the Examples directory and install dependencies:
cd Examples
mvn clean install
This command will:
Download the GroupDocs.Redaction library and all required dependencies
Compile all example classes
Prepare the project for execution
Running All Examples
Execute all examples using Maven:
cd Examples
mvn compile exec:java
This will run all examples sequentially. Output files are saved to target/Output/<example-name>/.
Output Location
All example outputs are saved to:
Examples/target/Output/<example-name>/
For example:
HelloWorld example → target/Output/HelloWorld/
ApplyRedaction example → target/Output/ApplyRedaction/
Troubleshooting
Maven Build Errors
If dependencies fail to download:
# Clean and rebuildmvn clean install -U
Java Version Issues
Ensure you’re using Java 8 or later:
java -version
javac -version
Set JAVA_HOME environment variable if needed.
Missing Sample Files
Ensure all sample files are present in Examples/Resources/SampleFiles/. If files are missing, examples may fail.
License Warnings
Examples run in trial mode by default. To remove license warnings: