Skip to main content

Prerequisites

  • Java 8 or higher
  • SunLicense Server API URL
  • Product ID

Project setup

1. Configure the Maven repository

Add the Sundevs repository to your pom.xml:

2. Add the dependency

Basic integration

1. Initialize the API

Don’t hardcode the license key. It’s different for every license, so write logic to read the license key from a config file and pass it as a parameter.

2. Implement license validation

Advanced configuration

Custom IP address

Loading the license from a file

For production environments, load the license key from a file:

Custom HWID

You can write your own HWID implementation and pass it with the request:

Troubleshooting

  1. Connection issues
    • Verify the API endpoint URL
    • Check network connectivity
    • Confirm firewall settings
  2. Validation failures
    • Verify the license key format
    • Check the product ID is correct
    • Confirm IP address restrictions
  3. Configuration problems
    • Ensure Java version compatibility
    • Check dependency versions
Remember to replace placeholder values (YOUR-LICENSE-KEY, YOUR_PRODUCT_ID, YOUR_API_URL) with your actual values.