Socket API Reimplementation


Java 13 has reimplemented the Java Socket API. Old Socket APIs such as java.net.Socket and java.net.ServerSocket have been exchanged.

  • PlainSocketImpl is not in use, now the Socket API gives points to NioSocketImpl.
  • The new implementation leverages java.nio infrastructure for good concurrency and i/o control.
  • The new implementation is back forward compatible with code using the older implementation.
  • The new implementation now defaults within Java 12.
  • Old implementation is often selected by many multiple types:
  • Set system property jdk.net.usePlainSockteImpl to true.
  • Run java with -Djdk.net.usePlainSocketImpl option.
  • Update JDK network configuration file available in ${java.home}/conf/net.properties.

Old execution and system property to take in old implementations are going to be far away from future launches.