tidy of JavaClassNames, better usage, and fixes to ssh-cli use of new RunAsRoot

addresses Aled's comments in #781 and a new bug noticed re ssh-cli