站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Serialization with Sockets - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Serialization with Sockets

Running the Example:

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/UsingSockets, compile the files Server.java and Client.java using JDKTM1.1 or higher:
      javac Server.java
      javac Client.java 
    
  2. Run the Server:
      java Server
    
  3. Suspend the Server, using Ctrl/Z on UNIX systems.
  4. Put the Server in the background, using the following command on UNIX systems:
      bg
    
  5. Run the Client:
      java Client
    

Using sockets and serialization, the current date is sent from the client to the server, which then prints out the date.

Additional Information:

Abstract
Sources
List of Examples