void (String[] args) { try { String handlerId = ExternalAppUtil.getEnv(NativeSshAskPassAppHandler.IJ_SSH_ASK_PASS_HANDLER_ENV); int idePort = ExternalAppUtil.getEnvInt(NativeSshAskPassAppHandler.IJ_SSH_ASK_PASS_PORT_ENV); String description = args.length > 0 ? args[0] : null; ExternalAppUtil.Result result = ExternalAppUtil.sendIdeRequest(NativeSshAskPassAppHandler.ENTRY_POINT_NAME, idePort, handlerId, description); if (result.isError) { System.err.println(result.getPresentableError()); System.exit(1); } String passphrase = result.response; if (passphrase == null) { System.err.println("Authentication request was cancelled"); System.exit(1); // dialog canceled } System.out.println(passphrase); System.exit(0); } catch (Throwable t) { System.err.println(t.getMessage()); t.printStackTrace(System.err); System.exit(1); } }