fixed unable to load fxmlloader

This commit is contained in:
Sem van der Hoeven
2019-12-27 20:33:34 +01:00
parent dd1da4db8c
commit c735a7862e
5 changed files with 44 additions and 20 deletions

View File

@@ -4,6 +4,10 @@ import java.io.File;
import java.io.UnsupportedEncodingException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
/**
@@ -13,21 +17,24 @@ public class Main extends Application {
public static void main(String[] args) {
String excl = ">,[[----------[ >>>[>>>>]+[[-]+<[->>>>++>>>>+[>>>>]++[->+<<<<<]]<<<] ++++++[>------<-]>--[>>[->>>>]+>+[<<<<]>-],< ]> ]>>>++>+>>[ <<[>>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<<]]<[>+<-]>] >[>[>>>>]+[[-]<[+[->>>>]>+<]>[<+>[<<<<]]+<<<<]>>>[->>>>]+>+[<<<<]] >[[>+>>[<<<<+>>>>-]>]<<<<[-]>[-<<<<]]>>>>>>> ]>>+[[-]++++++>>>>]<<<<[[<++++++++>-]<.[-]<[-]<[-]<]<, ]";
try {
BfInterpreter interpreter = new BfInterpreter(",.");
interpreter.setCodeFromFile("mandelbrot-tiny.bf");
interpreter.interpret();
// interpreter.interpretAgain(excl);
} catch (Exception e) {
e.printStackTrace();
}
launch(Main.class);
// try {
// BfInterpreter interpreter = new BfInterpreter(",.");
// interpreter.setCodeFromFile("mandelbrot-tiny.bf");
// interpreter.interpret();
// // interpreter.interpretAgain(excl);
// } catch (Exception e) {
// e.printStackTrace();
// }
}
@Override
public void start(Stage stage) throws Exception {
Parent pane = FXMLLoader.load(getClass().getResource("/fxml/layout.fxml"));
Scene scene = new Scene(pane);
stage.setScene(scene);
stage.show();
}
}