This example is based on the code in the EthernetConfiguration.java sample file.

Note: For a complete and up-to-date version of the Java sample code, see the vsphere-automation-sdk-java VMware repository at GitHub.
...

    private String vmName;
    private String vmId;
    private Power powerService;

...
      this.powerService = vapiAuthHelper.getStubFactory().createStub(
            Power.class, this.sessionStubConfig);
      this.vmId = VmHelper.getVM(vapiAuthHelper.getStubFactory(),
            sessionStubConfig,
            vmName);
      this.powerService.start(this.vmId);

...