Files
VisualSapfor/src/_VisualDVM/Passes/All/LocalSingleCommand.java
2024-10-14 12:14:01 +03:00

16 lines
465 B
Java

package _VisualDVM.Passes.All;
import _VisualDVM.Utils;
import _VisualDVM.Passes.ProcessPass;
public class LocalSingleCommand extends ProcessPass<String> {
String command = "";
@Override
protected boolean canStart(Object... args) throws Exception {
command = (String) args[0];
return true;
}
@Override
protected void body() throws Exception {
target = Utils.readAllOutput(Runtime.getRuntime().exec(command));
}
}