code: public static void createIniFile(String... args) {
      try {
        // open up standard input
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String wikiid = null;
        if (args.length > 0)
          wikiid = args[0];
        else
          wikiid = getInput("wiki id", br);
        String username = null;
        if (args.length > 1)
          username = args[1];
        else
          username = getInput("username", br);
        String password = null;
        if (args.length > 2)
          password = args[2];
        else
          password = getInput("password", br);
        String email = null;
        if (args.length > 3)
          email = args[3];
        else
          email = getInput("email", br);
        File propFile = getPropertyFile(wikiid, username);
        String remember = null;
        if (args.length > 4)
          remember = args[4];
        else
          remember = getInput("shall i store " + username
              + "'s credentials encrypted in " + propFile.getName() + " y/n?",
              br);
        if (remember.trim().toLowerCase().startsWith("y")) {
          Crypt lCrypt = Crypt.getRandomCrypt();
          Properties props = new Properties();
          props.setProperty("cypher", lCrypt.getCypher());
          props.setProperty("salt", lCrypt.getSalt());
          props.setProperty("user", username);
          props.setProperty("email", email);
          props.setProperty("secret", lCrypt.encrypt(password));
          if (!propFile.getParentFile().exists()) {
            propFile.getParentFile().mkdirs();
          }
          FileOutputStream propsStream = new FileOutputStream(propFile);
          props.store(propsStream, "Mediawiki JAPI credentials for " + wikiid);
          propsStream.close();
        }
      } catch (IOException e1) {
        LOGGER.log(Level.SEVERE, e1.getMessage());
      } catch (GeneralSecurityException e1) {
        LOGGER.log(Level.SEVERE, e1.getMessage());
      }
    }
docs: create a credentials ini file from the command line