License4J is a pure Java library for creating and validating licenses. The key concept is features of a license.