I have developed some application software in Java language that I
plan to distribute to end users as a trialware.
How can I make the Java app work for a limited time. Say for a month
Have it call your server every time it launches (and once every 24
hours if left to run for that long) and perform some hard-to-spoof
communication whereby your server tells the app whether it should
function or not. Of course, this requires your users to always be
online when using the app.
A note to Andrew: This is the feature I tried to implement with
updating a file contained in the Jar file
You cannot really achieve this by checking local data and doing local
actions. The user can easily set back his clock, run the app in a VM,
etc., which will tend to screw up your checking.
Note: it is probably a bad idea to do any of the above. It will
introduce entirely new catastrophic points of failure and even if you
get the mechanism to work 100%, it is still going to alienate a number
of potential customers who are really pissed that it just suddenly
stopped working after a month. Even users who don't pay for your app
tend to contribute to your earnings by spreading the word to their
friends, some of whom will pay - /unless/ said non-payers get burned
by sudden deactivation in which case they will instead be telling
their friends how much your software sucks.
But, if you have extensively researched your market and determined
that product deactivation isn't going to have such negative effects on
your target audience, server-based (and probably registration key
based) authentication is the way to go.
Cheers,
Bent D