Jhipster writes all your chosen settings in the .yo-rc.json file so you could generate it yourself with the desired parameters and then call JHipster - it will detect it and generate everything accordingly
There's probably a better way but this should work for Windows:
public static void main(String[] args) {
String dir = "path/to/dir";
String json = "{\n" +
" \"generator-jhipster\": {\n" +
"<your settings>" +
" }\n" +
"}";
try {
PrintWriter out = new PrintWriter(dir + ".yo-rc.json");
out.println(json);
out.close();
ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", "cd \"" + dir + "\" && jhipster");
builder.redirectErrorStream(true);
Process p = builder.start();
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while (true) {
line = r.readLine();
if (line == null) { break; }
System.out.println(line);
}
} catch (IOException e) {
e.printStackTrace();
}
}