Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is examples.ntp.TimeClient.java
What is examples.ntp.TimeClient.java? Can I use to get the current time?
✍: FYIcenter.com
examples.ntp.TimeClient.java is an example program
demonstrating how to use the TimeTCPClient and TimeUDPClient classes.
This program connects to the default time service port of a specified server, retrieves the time, and prints it to standard output. See RFC 868 for details. The default is to use the TCP port. Use the -udp flag to use the UDP port.
You can follow these steps to download, view and run examples.telnet.WeatherTelnet.java program.
1. Download commons-net-3.5-bin.zip file from Apache Commons Net.
2. Unzip all files from commons-net-3.5-bin.zip, and install them to C:\local. You should see C:\local\commons-net-3.5 folder with two JAR files and "examples" sub folder:
05/01/2016 11:37 PM 303,658 commons-net-3.5.jar 05/01/2016 11:37 PM 82,453 commons-net-examples-3.5.jar 05/01/2016 11:37 PM <DIR> examples
3. View C:\local\commons-net-3.5\examples\ntp\TimeClient.java with a text editor.
4. Run TimeClient.java in command window with both JAR files included in the classpath:
C:\fyicenter> java
-cp .;C:\local\commons-net-3.5\commons-net-3.5.jar
;C:\local\commons-net-3.5\commons-net-examples-3.5.jar
examples.ntp.TimeClient
Usage: TimeClient [-udp] <hostname>
5. Get the current time from nist.gov time server:
C:\fyicenter> java
-cp .;C:\local\commons-net-3.5\commons-net-3.5.jar
;C:\local\commons-net-3.5\commons-net-examples-3.5.jar
examples.ntp.TimeClient time.nist.gov
Usage: TimeClient [-udp] <hostname>
Sat Nov 19 15:35:42 PST 2016
⇒ What Is examples.ntp.NTPClient.java
⇐ Connect to FTP Server with TelnetClientExample.java
2017-04-08, ∼3571🔥, 0💬
Popular Posts:
Apache Ant is a Java-based build tool. In theory, it is kind of like make, without make's wrinkles. ...
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
Old version of xml-apis.jar. JAR File Size and Download Location: File name: xmlParserAPIs.jar File ...
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 inst...