The Web Services SDK provides precompiled samples that use JAX-WS
libraries. The precompiled files include vim25.jar and samples.jar.
The precompiled sample programs use the vim25.jar
client side library to access the Web Services API. The following instructions
describe how to set up your environment to run sample programs. These instructions
assume that the target server uses HTTPS, which is the default server configuration.
Procedure
-
If the JDK is not installed, create
directories for the JDK and for the vSphere Web Services SDK package.
Do not use spaces in
the directory names, to avoid issues with some of the included SDK batch and
script files.
-
Install Java SE with JDK 11.
-
Unpack the components into subdirectories
created in
Step 1, using the provided installer if appropriate.
The JDK uses an installation wizard. The SDK
ZIP file unpacks into the directory you specify.
- (Optional)
Import server-certificates and use the Java
keytool utility to create a
vmware.keystore. See
Import Server Certificates into the Java Keystore for the Web Services SDK for details.
As an alternative,
pass the
--ignorecert argument at
runtime to ignore server-certificate verification for any of the sample Java
applications.
-
Create the JAVAHOME environment variable.
The JAVAHOME environment variable must be set
to the root path of the Java Runtime Environment (JRE), such as C:\Program Files\Java\jdk1.8.0_221. The
root directory of your Java installation contains bin\javac and other binary files needed to
build the stubs and the samples.
-
If you are unable to use the run.bat or run.sh
script to run Java samples, add the precompiled sample files, vim25.jar and samples.jar, to your system CLASSPATH
environment variable.