> String instanceName = args[2];
> String zone = args[3];
> - String googleUserName = args[4];
> - String sshPrivateKey = Files.toString(new File(args[5]),
> Charset.defaultCharset());
> + String userName = System.getProperty("user.name");
> + String sshPrivateKeyFileName = System.getProperty("user.home") +
> "/.ssh/google_compute_engine";
A standard tool gcloud creates these files and puts them in these locations
(see https://developers.google.com/compute/docs/instances#sshkeys). Situations
when they are located elsewhere should be very rare. I think that it's very
inconvenient for a user having to enter the paths each time as command-line
arguments, this is why I suggest hardcoding the locations in this example.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/63/files#r17209408