How to create a trial version of a Java program [closed]

Here is an idea:

  1. Create a database (such as a SQL Server database) that is publicly available on the web. It will keep a list of “trial version” license keys. You can use the same system for full-version license keys when your product is purchased.

  2. When your Java software is first run, it’ll cause a trial license to be created which will be stored in the database

  3. The Java software checks for a valid license each time it is run. The date that the license was created is stored in the database so it doesn’t matter what the client clocks are set at.

  4. The software stops functioning when the license is expired

Standard windows software can look up the CPU ID and use that as part of the license, so that each computer can only run the trial software once. Does anyone know if there is a “JVM ID” of some kind that can be used for this purpose?

Maybe there is free or open-source license-related code out there already?

Leave a Comment