Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


NETCONF Java Toolkit Overview

The NETCONF Java toolkit provides an object-oriented interface for communicating with a NETCONF server. The toolkit enables programmers familiar with the Java programming language to create Java applications to easily connect to a device, open a NETCONF session, construct configuration hierarchies in XML, and create and execute operational and configuration requests.

NETCONF Java Toolkit Overview

The NETCONF Java toolkit provides classes with methods that implement the functionality of the NETCONF protocol operations defined in RFC 4741. All basic protocol operations are supported. The NETCONF XML management protocol uses XML-based data encoding for configuration data and remote procedure calls. The toolkit provides classes and methods that aid in creating, modifying, and parsing XML.

The NETCONF Java toolkit has four basic classes, which are described in Table 1.

Table 1: NETCONF Java Toolkit Classes




Defines the device on which the NETCONF server runs, and represents the SSHv2 connection and default NETCONF session with that device.


Represents a NETCONF session established with the device on which the NETCONF server runs.


Creates XML-encoded data.


XML-encoded data that represents an operational or configuration request or configuration data.

A configuration management server is generally a PC or workstation that is used to configure a router, switch, or security device remotely. The communication between the configuration management server and the NETCONF server through the NETCONF Java toolkit involves:

  • Establishing a NETCONF session over SSHv2 between the configuration management server and the NETCONF server.

  • Creating RPCs corresponding to requests and sending these requests to the NETCONF server.

  • Receiving and processing the RPC replies from the NETCONF server.

To use the NETCONF Java toolkit, you must install the toolkit and add the .jar path to your CLASSPATH. For more information about installing the NETCONF Java toolkit, see Download and Install the NETCONF Java Toolkit.

Once the toolkit is installed, you connect to a device, create a NETCONF session, and execute operations by adding the associated code to a Java program file, which is then compiled and executed. For more information about creating NETCONF Java toolkit programs, see Create and Execute a NETCONF Java Application.


Juniper Networks devices running Junos OS Release 7.5R1 or later support the NETCONF XML management protocol.

Benefits of the NETCONF Java Toolkit

NETCONF Java Toolkit provides the following benefits:

  • Enables Java applications to access to the Junos XML API

  • Enables Java programmers to quickly start using the NETCONF and Junos XML API to manage and configure routing, switching, and security devices running Junos OS

  • Ability to create custom, reusable applications to perform and automate operational and configuration tasks