View as MarkdownMarkdown
Before running the examples, ensure you have:
- Java JDK 8 or later (JDK 17 LTS recommended) - See System Requirements
- Maven 3.6 or later - For building and running examples
- Git - To clone the repository (optional)
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
Download the repository as a ZIP file from GitHub and extract it.
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
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>/.
All example outputs are saved to:
Examples/target/Output/<example-name>/
For example:
HelloWorld example → target/Output/HelloWorld/ApplyRedaction example → target/Output/ApplyRedaction/
If dependencies fail to download:
# Clean and rebuild
mvn clean install -U
Ensure you’re using Java 8 or later:
java -version
javac -version
Set JAVA_HOME environment variable if needed.
Ensure all sample files are present in Examples/Resources/SampleFiles/. If files are missing, examples may fail.
Examples run in trial mode by default. To remove license warnings:
- Get a temporary license from GroupDocs
- Update
Constants.java with your license path - Run
SetLicenseFromFile example
View the complete source code and examples on GitHub:
https://github.com/groupdocs-redaction/GroupDocs.Redaction-for-Java
We value your opinion. Your feedback will help us improve our documentation.