mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
无头模式 裁决
This commit is contained in:
19
JisolGameServer/Main/src/test/java/TestMain.java
Normal file
19
JisolGameServer/Main/src/test/java/TestMain.java
Normal file
@@ -0,0 +1,19 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user