// Windows 98 command.com
Runtime.getRuntime().exec( "command.com /E:1900 /C MyBat.bat" );
Runtime.getRuntime().exec( "command.com /E:1900 /C ATTRIB -h C:\\temp\\*.*" );

// Windows NT/W2K/XP/VISTA cmd.exe
Runtime.getRuntime().exec( "cmd.exe /E:1900 /C MyCmd.cmd" );
Runtime.getRuntime().exec( "cmd.exe /E:1900 /C copy C:\\this.txt D:\\that.txt" );

// Windows NT/W2K/XP/VISTA starting a service, you can't use the ... syntax here.
Runtime.getRuntime().exec( new String[] {
                              "cmd.exe",
                              "/E:1900",
                              "/C",
                              "net",
                              "start",
                              "servicename"});

// Windows 98 with 4DOS
Runtime.getRuntime().exec( "C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
Runtime.getRuntime().exec( "C:\\4DOS601\\4DOS.COM /E:1900 /C del C:\\this.txt" );

// Windows NT/W2K/XP/VISTA with 4NT
Runtime.getRuntime().exec( "F:\\Program Files\\JPSoft\\4NT8\\4NT.EXE /E:1900 /C MyBtm.btm" );
Runtime.getRuntime().exec( "F:\\Program Files\\JPSoft\\4NT8\\4NT.EXE /E:1900 /C DIR C:\\temp" );

// Linux Bash
String[] cmd = {"/bin/bash", "-c", "rm /dirA/*"};
Runtime.getRuntime().exec( cmd );