By default Java preferences are getting stored in registry on windows platform. Alternative of the registry is to story preferences in file.
File based preferences can be used for truelicense. Following is the link showing how to implement file based java preferences.
http://www.davidc.net/programming/java/java-preferences-using-file-backing-store
Hope, this will be useful in your case.