private char[] getPassword(String prompt, boolean echoWarn) throws IOException {

		boolean success = false;
		char[] password = null;
		int c;
		try {
			Console cons = System.console();
			if (cons != null) {
				password = cons.readPassword(prompt);
			}
			else {
				if (echoWarn) {
					System.out.println("*** WARNING! Password entry will NOT be masked ***");
				}

				System.out.print(prompt);

				while (true) {
					c = System.in.read();
					if (c <= 0 || c == '\n') {
						break;
					}
					if (c == '\r') {
						continue;
					}
					if (password == null) {
						password = new char[1];
					}
					else {
						char[] newPass = new char[password.length + 1];
						// copy prior entry into expanded array and clear old array
						for (int i = 0; i < password.length; i++) {
							newPass[i] = password[i];
							password[i] = 0;
						}
						password = newPass;
					}
					password[password.length - 1] = (char) c;
				}
			}
			success = true;
			return password;

		}
		finally {
			if (!success && password != null) {
				Arrays.fill(password, (char) 0);
			}
		}
	}
Main method for processing ServerAdmin command line arguments.
The following properties may be set:
<pre>
  UserAdmin.invocation - identifies the name of the application used when displaying usage text.
  UserAdmin.config - identifies the config file instead of passing on command line.
</pre>
@param args command line arguments
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/ServerAdmin.java