このコンテンツは選択した言語では利用できません。

Chapter 1. Overview


The Java software development kit is a collection of classes that allows you to interact with the Red Hat Virtualization Manager in Java-based projects. By downloading these classes and adding them to your project, you can access a range of functionality for high-level automation of administrative tasks.

Red Hat Virtualization provides two versions of the Java software development kit:

Version 3

The V3 Java software development kit provides backwards compatibility with the class and method structure provided in the Java software development kit as of the latest release of Red Hat Enterprise Virtualization 3.6. Applications written using the Java software development kit from Red Hat Enterprise Virtualization 3.6 can be used with this version without modification.

Warning

Version 3 is no longer supported. The information and examples specific to version 3 are provided as a reference only. Migrate to version 4 for continued support.

Version 4
The V4 Java software development kit provides an updated set of class and method names and signatures. Applications written using the Java software development kit from Red Hat Enterprise Virtualization 3.6 must be updated before they can be used with this version.

Either version of the Java software development kit can be used in a Red Hat Virtualization environment as required by installing the corresponding package and adding the required libraries to your Java project.

1.1. Prerequisites

To install the Java software development kit, you must have:

  • A system where Red Hat Enterprise Linux 7 is installed. Both the Server and Workstation variants are supported.
  • A subscription to Red Hat Virtualization entitlements.
Important

The software development kit is an interface for the Red Hat Virtualization REST API. As such, you must use the version of the software development kit that corresponds to the version of your Red Hat Virtualization environment. For example, if you are using Red Hat Virtualization 4.2, you must use the version of the software development kit designed for 4.1.

1.2. Installing the Java Software Development Kit

Install the Java software development kit and accompanying documentation.

Installing the Java Software Development Kit

  1. Enable the repositories:

    # subscription-manager repos \
        --enable=rhel-7-server-rpms \
        --enable=rhel-7-server-rhv-4.3-manager-rpms \
        --enable=jb-eap-7.2-for-rhel-7-server-rpms
    Copy to Clipboard Toggle word wrap
  2. Install the required packages:

    • For V3:

      # yum install ovirt-engine-sdk-java ovirt-engine-sdk-javadoc
      Copy to Clipboard Toggle word wrap

      The V3 Java software development kit and accompanying documentation are downloaded to the /usr/share/java/rhevm-sdk-java directory and can be added to Java projects.

    • For V4:

      # yum install java-ovirt-engine-sdk4
      Copy to Clipboard Toggle word wrap

      The V4 Java software development kit and accompanying documentation are downloaded to the /usr/share/java/java-ovirt-engine-sdk4 directory and can be added to Java projects.

1.3. Dependencies

To use the Java software development kit in Java applications, you must add the following JAR files to the class path of those applications:

  • commons-beanutils.jar
  • commons-codec.jar
  • httpclient.jar
  • httpcore.jar
  • jakarta-commons-logging.jar
  • log4j.jar

The packages that provide these JAR files are installed as dependencies to the ovirt-engine-sdk-java package. By default, they are available in the /usr/share/java directory on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7 systems.

1.4. Configuring SSL

The Red Hat Virtualization Manager Java SDK provides full support for HTTP over Secure Socket Layer (SSL) and the IETF Transport Layer Security (TLS) protocol using the Java Secure Socket Extension (JSSE). JSSE has been integrated into the Java 2 platform as of version 1.4 and works with the Java SDK out of the box. On earlier Java 2 versions, JSSE must be manually installed and configured.

1.4.1. Configuring SSL

The following procedure outlines how to configure SSL using the Java SDK.

Configuring SSL

  1. Download the certificate used by the Red Hat Virtualization Manager.

    Note

    By default, the location of the certificate used by the Red Hat Virtualization Manager is in /etc/pki/ovirt-engine/ca.pem.

  2. Create a truststore:

    $ keytool -import -alias "server.crt truststore" -file ca.crt -keystore server.truststore
    Copy to Clipboard Toggle word wrap
  3. Specify the trustStoreFile and trustStorePassword arguments when constructing an instance of the Api or Connection object:

    myBuilder.trustStoreFile("/home/username/server.truststore");
    myBuilder.trustStorePassword("p@ssw0rd");
    Copy to Clipboard Toggle word wrap
    Note

    If you do not specify the trustStoreFile option when creating a connection, the Java SDK attempts to use the default truststore specified by the system variable javax.net.ssl.trustStore. If this system variable does not specify a truststore, the Java SDK attempts to use a truststore specified in $JAVA_HOME/lib/security/jssecacerts or $JAVA_HOME/lib/security/cacerts.

1.4.2. Host Verification

By default, the identity of the host name in the certificate is verified when attempting to open a connection to the Red Hat Virtualization Manager. You can disable verification by passing the following argument when constructing an instance of the Connection class:

myBuilder.insecure(true);
Copy to Clipboard Toggle word wrap
Important

This method should not be used for production systems due to security reasons, unless it is a conscious decision and you are aware of the security implications of not verifying host identity.

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat