Java 13

Java 13 – Socket API Reimplementation

Java 13 have reimplemented the Java Socket API. Old Socket APIs like java.net.Socket and java.net.ServerSocket has been replaced.

  1. PlainSocketImpl is no more in use, now the Socket API provider points to NioSocketImpl.
  2. New implementation leverages the java.nio infrastructure for better concurrency and i/o control.
  3. New implementation is backwards compatible with code using older implementation.
  4. New implementation is now default with Java 12.
  5. Old implementation can be selected by multiple ways:
    • 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.
  6. Old implementation and system property to select old implementation will be removed from future release.

About the Author: Elavarasan PK

Technical Specialist, Intersoft Data Labs