version 1.5, 2000/04/02 19:24:40 |
version 1.9, 2001/01/28 19:43:16 |
|
|
/** |
/** |
* $OpenXM: OpenXM/src/OpenMath/elimi.java,v 1.4 2000/03/16 09:14:52 tam Exp $ |
* $OpenXM: OpenXM/src/OpenMath/elimi.java,v 1.8 2001/01/28 19:17:23 tam Exp $ |
*/ |
*/ |
|
|
import JP.ac.kobe_u.math.tam.OpenXM.*; |
import ORG.openxm.tam.*; |
import java.applet.*; |
import java.applet.*; |
import java.awt.event.*; |
import java.awt.event.*; |
import java.awt.*; |
import java.awt.*; |
Line 107 class elimi extends Applet implements ActionListener,R |
|
Line 107 class elimi extends Applet implements ActionListener,R |
|
Thread.yield(); |
Thread.yield(); |
|
|
tmp = oxm.receive(); |
tmp = oxm.receive(); |
System.out.println("=> "+ tmp); |
System.err.println("=> "+ tmp); |
} |
} |
}catch(java.io.IOException e){} |
}catch(java.io.IOException e){} |
} |
} |
Line 198 class elimi extends Applet implements ActionListener,R |
|
Line 198 class elimi extends Applet implements ActionListener,R |
|
} |
} |
|
|
public void start(){ |
public void start(){ |
System.out.println("Connecting to "+ host |
System.err.println("Connecting to "+ host |
+"("+ ControlPort +","+ DataPort +")"); |
+"("+ ControlPort +","+ DataPort +")"); |
|
|
try{ |
try{ |
Runtime runtime = Runtime.getRuntime(); |
Runtime runtime = Runtime.getRuntime(); |
|
//Process proc = runtime.exec("xterm -name test"); |
runtime.exec("sh -c \"xterm -name $OpenXM_HOME\""); |
|
//runtime.getInputstream(); |
//runtime.getInputstream(); |
//runtime.getOutput(); |
//runtime.getOutput(); |
//runtime.exec("sh -c \"/home/tam/OpenXM/lib/sm1/bin/oxlog /usr/X11R6/bin/xterm -name echo ${OpenXM_HOME} /home/tam/OpenXM/lib/sm1/bin/ox -ox /home/tam/OpenXM/lib/sm1/bin/ox_sm1_forAsir -data "+ DataPort +" -control "+ ControlPort +"\""); |
//runtime.exec("sh -c \"/home/tam/work/OpenXM/lib/sm1/bin/oxlog /usr/X11R6/bin/xterm -name echo ${OpenXM_HOME} /home/tam/OpenXM/lib/sm1/bin/ox -ox /home/tam/OpenXM/lib/sm1/bin/ox_sm1_forAsir -data "+ DataPort +" -control "+ ControlPort +"\""); |
|
runtime.exec("xterm -e ox -ox /home/tam/work/OpenXM/bin/ox_sm1 -data "+ DataPort +" -control "+ ControlPort ); |
|
|
Thread.sleep(3000); |
Thread.sleep(3000); |
|
|
oxm = new OpenXM(host,ControlPort,DataPort); |
oxm = new OpenXM(host,ControlPort,DataPort); |
System.out.println("Connected."); |
System.err.println("Connected."); |
oxm.send(new CMO_STRING("(cohom.sm1) run ;\n")); |
oxm.send(new CMO_STRING("(cohom.sm1) run ;\n")); |
oxm.send(new SM(SM.SM_executeStringByLocalParser)); |
oxm.send(new SM(SM.SM_executeStringByLocalParser)); |
|
|
thread = new Thread(this); |
thread = new Thread(this); |
thread.start(); |
thread.start(); |
}catch(Exception e){ |
}catch(Exception e){ |
System.out.println("failed."); |
System.err.println("failed."); |
stop(); |
stop(); |
} |
} |
} |
} |
Line 253 class elimi extends Applet implements ActionListener,R |
|
Line 253 class elimi extends Applet implements ActionListener,R |
|
|
|
for(int i=0;i<argv.length;i++){ |
for(int i=0;i<argv.length;i++){ |
if(argv[i].equals("-h")){ |
if(argv[i].equals("-h")){ |
System.out.print(usage()); |
System.err.print(usage()); |
System.exit(0); |
System.exit(0); |
}else if(argv[i].equals("-debug")){ |
}else if(argv[i].equals("-debug")){ |
//debug = true; |
//debug = true; |