単純なものだとこんな感じで実行できると思います。
`
import java.io.IOException;
public class BatExecute {
public static void main (String args[]) {
String cline = "cmd.exe /c start c:\n\ntest.bat";//"test.bat"はCドライブ直下に配置済みであること
try {
Runtime.getRuntime().exec(cline);
} catch (IOException e) {
e.printStackTrace();
}
}
}
`
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。