• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Obtaining a system-independent time and date  RSS feed

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get current in java? Not from system's date because anyone can change it....
I want current to validate my application expiry...please help me...thanks in advance...
Saloon Keeper
Posts: 5476
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the future, please UseAMeaningfulSubjectLine. A subject of "java" in a forum dedicated to Java topics tells us nothing about your question.

By "current", do you mean "current date and time"? If so, you can use the NTP protocol to retrieve an independent date. The https://commons.apache.org/proper/commons-net/ library has a client for that, as apparently does this class.

Be aware that -pretty much whatever you do in a Java application- a determined attacker will be able to reverse-engineer it and remove any such check. So make sure that the kind of attacker you're trying to guard against is not determined and capable enough to work circumvent those checks.
Maybe he went home and went to bed. And took this tiny ad with him:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!