IntegrateHarey.java 933 Bytes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import javax.swing.JOptionPane;


public class IntegrateHarey {

/**
* @param args
*/
public static void main(String[] args) {

File aux = new File("");
//asdasda

String path;
String osName = System.getProperty("os.name");
if (osName.startsWith("Windows")) {
path = "\\tp\\harvey\\circus_examples\\example1.smt";
}
else{
path = "//tp//harvey//circus_examples//example1.smt";
}
try {
String application = aux.getAbsolutePath() + "\\tp\\harvey\\win\\rv.exe";
Runtime.getRuntime().exec(application);
Process processo = Runtime.getRuntime().exec(application);
InputStream ips = processo.getInputStream();

int c = 0;
while ((c = ips.read()) != -1) {
System.out.print((char)c);
}

} catch (IOException e) {
e.printStackTrace();
}
}

}