This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/setup/wizard/lib/system/executeCommand.java

17 lines
405 B
Java
Raw Normal View History

import java.io.*;
import java.lang.System;
import java.util.Properties;
public class executeCommand {
public static void main(String args[]) throws Exception {
String command = args[0];
try {
// Execute a command without arguments
Process child = Runtime.getRuntime().exec(command);
} catch (IOException e) {
System.err.println("Error: " + e.getMessage());
}
}
}