Develop for XenServer

Getting Started with Java

The XenServer-SDK directory contains the following folders that are relevant to Java programmers:

  • XenServerJava: The XenServer SDK for Java

    • xen-api-x.y.z.jar: Java archive file containing the compiled library.

    • xen-api-x.y.z-javadoc.jar: Java archive file containing the documentation.

    • xen-api-x.y.z-sources.jar: Java archive file containing the source code as a Maven project. Every API object is associated with one Java file. For example the functions implementing the VM operations are contained within the file

RPC protocol:

The Java SDK supports the JSON-RPC v2.0 protocol.

Platform supported:

  • Linux
  • Windows


  • The library is a Java archive file xenserver.jar that is linked by Java programs.


This library is generally, but not fully, backwards compatible. To interact with hosts running older versions of XenServer or Citrix Hypervisor, it is advisable to use the library of the same version as the host.


XenServerJava is dependent upon the JSON library by the Jackson project and the Apache HttpClient by the Apache Software Foundation.


Examples on the usage of the Java SDK can be found at XenServerJava usage examples on GitHub.

Getting Started with Java

In this article