Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @FXML
- private void game1Button(MouseEvent e) throws IOException {
- String gamePath = "java -jar ../Spielesammlung/src/application/Spiele/XvsO/XvsO.jar";
- Process cat = Runtime.getRuntime().exec(gamePath);
- BufferedInputStream catOutput = new BufferedInputStream(cat.getInputStream());
- int read = 0;
- byte[] output = new byte[1024];
- if ((read = catOutput.read(output)) == -1) {
- }
- while ((read = catOutput.read(output)) != -1) {
- System.out.print(output[read]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement