String cmd = "sh /opt/D2RServer/d2rq-0.8.1/project/hello_java_shell";
Runtime run = Runtime.getRuntime();
String result = "";
try {
Process p = run.exec(cmd);
BufferedInputStream in = new BufferedInputStream(p.getInputStream());
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String lineStr;
while ((lineStr = br.readLine()) != null) {
result += lineStr;
}
br.close();
in.close();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(result); |
String cmd = "/opt/D2RServer/d2rq-0.8.1/generate-mapping -u root -p asdfasdf -d com.mysql.jdbc.Driver -o /opt/D2RServer/d2rq-0.8.1/aniuer.n3 jdbc:mysql://localhost/radar";
|
String cmd = "/opt/D2RServer/d2rq-0.8.1/dump-rdf -u root -p asdfasdf -f RDF/XML-ABBREV -o /opt/D2RServer/d2rq-0.8.1/project/aniuer2.rdf jdbc:mysql://localhost:3306/Weapon";
|