How to Run Examples
Leave feedback
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)
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:
HelloWorldexample →target/Output/HelloWorld/ApplyRedactionexample →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.javawith your license path - Run
SetLicenseFromFileexample
View the complete source code and examples on GitHub:
https://github.com/groupdocs-redaction/GroupDocs.Redaction-for-Java
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.