For our Java application, we are considering to toughen our licensing conditions and related code for certain countries for which we are experiencing massive license infringement. Therefore we want to find out the real user language and user country. I'm aware, that you can query system properties user.language
and user.country
, but these can easily be faked when starting the Java application using e.g. -Duser.language=en
. Is there a way to detect the original, unaltered values for these properties? Or is there another API which gives us the real settings?
Note:
the solution should require only a small computational effort and no Internet connection
we are not looking for a perfectly safe solution, but it also shouldn't be too easy to fake (like with system properties).
Do not even try. You are trying to solve at a technical level a legal question. I once used a Linux machine where different users had different declared languages and time zones, and still have a VM using "C" language et UTC time zone.
As per my experience, such controls can annoy well intentioned users that happen to use a non standard configuration, but cannot prevent someone to deliberately give a wrong information.
So my advice is:
It could save you number of hotline calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With