■ The J2SE is available from http://www.oracle.com. For best results, use JDK 1.7 or later.
■ Obtain the VMware vSphere Web Services SDK from https://developercenter.vmware.com. It is included in the vSphere Management SDK package.The samples generated using JAX-WS libraries and compiled using Java JDK 1.7 include vim25.jar and samples.jar. You can use these libraries without generating new stubs and recompiling if you are using the same version of the JDK.
3 Unpack the components into subdirectories created in Step 1, using the provided installer if appropriate.
■ Unpack with Use folder names selected, to maintain the organizational structure.
■ On UNIX development systems, use the unzip command with the -a modifier, to ensure proper line-endings in the shell scripts. For example:
4 (optional) Import server-certificates and use the Java keytool utility to create a vmware.keystore. See Import Server Certificates into the Java Keystore for details.As an alternative, pass the --ignorecert argument at runtime to ignore server-certificate verification for any of the sample Java applications.The JAVAHOME environment variable must be set to the root path of the Java Runtime Environment (JRE), such as C:\Program Files\Java\jdk1.7.0_21. The root directory of your Java installation contains bin\javac and other binary files needed to build the stubs and the samples.
6 If you are unable to use the run.bat script to run Java samples, add the precompiled sample files, vim25.jar and samples.jar, to your system CLASSPATH environment variable.To test your setup, run the Java version of SimpleClient, as described in Running the SimpleClient Sample Application to Validate Setup.
Some of the batch files are used by other batch files. For example, build.bat calls the lcp.bat and clean.bat scripts. If you modify the batch files for any reason, be aware of the dependencies among them.
Checks for environment variable JAVAHOME and sets PATH, using the JAVAHOME variable. Cleans up existing Java files (by calling clean.bat or clean.sh). build.bat sets the local classpath (by calling lcp.bat). Creates the vim25.jar, and samples.jar files. Removes any existing artifacts before building the samples, deleting Java class files in the samples packages and samples.jar file. Called by build script. Import server certificates if you plan to use the HTTPS protocol and if you do not plan to use the --ignorecert command-line argument.To use HTTP, rather than HTTPS, and avoid the use of certificates entirely, follow the procedure detailed in Modifying Server Configurations to Support HTTP. However, using HTTPS provides better security for production environments.The JAVAHOME environment variable must be set and added to the PATH environment variable. The certificate for each target server must be located in the C:\VMware-Certs subdirectory. See Obtaining Server Certificates.Create the directory only. The actual keystore file, vmware.keystore, is created during the process of importing the certificates.
4 Use the Java keytool utility to import a certificate.
6 Type yes and press Enter to respond to the prompt and import the certificate into the vmware.keystore keystore.