fixed unable to load fxmlloader
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user