how to force an exit of an java programm in the cmd code example Example: how to exit a java program System.exit(0);