mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
20 lines
672 B
Java
20 lines
672 B
Java
|
import java.io.*;
|
||
|
|
||
|
public class TestMain {
|
||
|
public static void main(String[] args) {
|
||
|
try {
|
||
|
Process process = Runtime.getRuntime().exec("cmd /c npm run main",null,new File("D:\\Jisol\\JisolGame\\headless"));
|
||
|
InputStream is = process.getInputStream();
|
||
|
InputStreamReader isr = new InputStreamReader(is);
|
||
|
BufferedReader br = new BufferedReader(isr);
|
||
|
String content = br.readLine();
|
||
|
while (content != null) {
|
||
|
System.out.println(content);
|
||
|
content = br.readLine();
|
||
|
}
|
||
|
} catch (IOException e) {
|
||
|
e.printStackTrace();
|
||
|
}
|
||
|
}
|
||
|
}
|