I want to ask a server, whose IP I know, to send the date and time to a client.
How can I implement this in Java?
Article describing the details: http://www.informit.com/articles/article.aspx?p=26316&seqNum=3
client http://commons.apache.org/net/apidocs/org/apache/commons/net/ntp/NTPUDPClient.html
To start with you'll need to clarify (for yourself as much as anything):
Once you've answered those questions, (and more I'm sure), it'll be easier to answer how to do it in java.
Update
The updated question is much clearer.. nice.
Your question is not clear so I'll post a number of possible answers.
If the server exists and have a protocol to answer your request
If the server exists but doesn't have a protocol to answer your request and YOU own that server and already logs ...which IP has been known to respond the date and time
If the server exists but doesn't have a protocol to answer your request and you own that server and doesn't logs ...which IP has been known to respond the date and time
If The server exists but doesn't have a protocol to answer your request and you DON'T own that server.
If the server doesn't exists and you can create it.
If the server doesn't exist and you cannot create it
... And so on.