I am working with java application programs,especially billing software.
I want to gave my application program as demo version for customers. So I want to set my program for a limited period of time(30 days Trial), and after that It should ask for a valid key for continuing.
How is it possible to Set a 30 days time period for my application in Java.
Any Idea is acceptable
Thanks in advance..
First, see the linked article about how to get and manipulate the date. This will be very useful in the future.
How to get the current date/time in Java
Second, you will only have to do some simple comparisons to clarify what the current date is, versus the fixed limit for the license. Depending on how you are distributing this, you will want to implement the licenses in different ways. For instance, include a fixed start date (such as the day you distribute) and have the expiration be one month later. Your other option is to dynamically update a license key that specifies the current date, every day. This way when you send it out later you will be covered from the day you sent it out - as opposed to from a fixed date.