User Tools

Site Tools


java_networking

Java Networking

The Java networking API provides Java classes for networking functionality, including addressing, classes for using URLs and URIs, socket classes for connecting to servers, networking security functionality, and more. It consists of these packages:

  • java.net: Classes for implementing networking applications.
  • java.net.http: Contains the API for the HTTP Client, which provides high-level client interfaces to HTTP (versions 1.1 and 2) and low-level client interfaces to WebSocket instances. See Java HTTP Client for more information about this API, including videos and sample code.
  • javax.net: Classes for creating sockets.
  • javax.net.ssl: Secure socket classes.
  • jdk.net: Platform specific socket options for the java.net and java.nio.channels socket classes.

Networking System Properties

You can set the following networking system properties in one of three ways:

Using the -D option of the java command Using the System.setProperty(String, String) method Specifying them in the $JAVA_HOME/conf/net.properties file. Note that you can specify only proxy-related properties in this file. Unless specified otherwise, a property value is checked every time it's used.

https://docs.oracle.com/en/java/javase/17/core/java-networking.html#GUID-82A738CB-2A1C-4AC8-B9DA-C4543D398B51

java_networking.txt · Last modified: 2024/04/28 03:45 (external edit)