I am making a distributed java app for which I need both parts of the app to run on one standard time. Since system times can be different I was thinking if java API contains some class to download time from a standard online source?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use the NTP (Network Time Protocol):
http://en.wikipedia.org/wiki/Network_Time_Protocol
The following link contains some reference Java NTP Client code for interacting with an NTP server:
http://psp2.ntp.org/bin/view/Support/JavaSntpClient