下面列出了java.lang.Process#destroy ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private static void runtool(jvm jvm, String loc, String[] args)
throws IOException
{
System.out.println(concatenate(args) + ':');
if (jvm == null) {
com.pivotal.gemfirexd.internal.iapi.tools.run.main(args);
return;
}
Vector cmd = jvm.getCommandLine();
cmd.addElement("-jar");
cmd.addElement(loc);
for (int i=0; i < args.length; i++) {
cmd.addElement(args[i]);
}
String command = concatenate((String[]) cmd.toArray(new String[0]));
Process pr = null;
try
{
pr = Runtime.getRuntime().exec(command);
BackgroundStreamSaver saver =
new BackgroundStreamSaver(pr.getInputStream(), System.out);
saver.finish();
pr.waitFor();
pr.destroy();
} catch(Throwable t) {
System.out.println("Process exception: " + t.getMessage());
if (pr != null)
{
pr.destroy();
pr = null;
}
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
private static void runtool(jvm jvm, String loc, String[] args)
throws IOException
{
System.out.println(concatenate(args) + ':');
if (jvm == null) {
com.pivotal.gemfirexd.internal.iapi.tools.run.main(args);
return;
}
Vector cmd = jvm.getCommandLine();
cmd.addElement("-jar");
cmd.addElement(loc);
for (int i=0; i < args.length; i++) {
cmd.addElement(args[i]);
}
String command = concatenate((String[]) cmd.toArray(new String[0]));
Process pr = null;
try
{
pr = Runtime.getRuntime().exec(command);
BackgroundStreamSaver saver =
new BackgroundStreamSaver(pr.getInputStream(), System.out);
saver.finish();
pr.waitFor();
pr.destroy();
} catch(Throwable t) {
System.out.println("Process exception: " + t.getMessage());
if (pr != null)
{
pr.destroy();
pr = null;
}
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}
void shutdownFast() {
Process p = child;
if (p != null) {
p.destroy();
}
}