**Language / Язык:** [English](java.md) | [Русский](../ru/examples/java.md) # Java Java 11+ `HttpClient` cookbook using a Basic-auth session (`vmware-api-session-id`) against `https://localhost`. No third-party JSON library — responses are inspected with a small string-based field extractor suitable for a lab smoke. ```bash cd examples/java javac Cookbook.java && java Cookbook ``` Override defaults with `VSPHERE_BASE`, `VSPHERE_USER`, `VSPHERE_PASSWORD`, `VSPHERE_VM_NAME` environment variables. See [`Cookbook.java`](../../examples/java/Cookbook.java) for the session → create → power → wait-task → delete flow. The client installs a trust-all `SSLContext` for the local self-signed development gateway certificate only — do not reuse it against a real vCenter.