
I was always fond of precise time. One day I wondered how NTP works and in the way decided to create SNTP Java client (RFC-2030).
For now client has only basic features and works only in unicast mode. Currently SNTPJC doesn’t update system time, if such feature might be needed by someone, it might be implemented using JNI.
This programming session was ignited by academic curiosity so I don’t think I will actively develop it any further. But the source code might be useful for somebody so here’s the SNTPJC google code project.
If you are interested in testing it – go and download latest sntpjc-<version>.jar and execute it with some NTP server address:
java -jar sntpjc-<version>.jar ntp.data.lt
Output:
Checking with: ntp.data.lt (92.61.32.9) System time offset is: -0.004765 s