Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main.java:
- public class Main extends Application {
- public static void main(String[] args) {
- launch(args);
- }
- public void start(Stage primaryStage) throws Exception {
- Locale.setDefault(new Locale("pl"));
- final String PATH = "/resources/fxml/BorderPaneMain.fxml";
- FXMLLoader loader = new FXMLLoader(this.getClass().getResource(PATH));
- BorderPane borderPane = FXMLLoader.load(this.getClass().getResource(PATH));
- loader.setController(this);
- ResourceBundle bundle = ResourceBundle.getBundle("bundles.messages");
- loader.setResources(bundle);
- Scene scene = new Scene(borderPane);
- primaryStage.setScene(scene);
- primaryStage.setTitle(bundle.getString("tittle.app"));
- primaryStage.show();
- }
- }
- BorderPaneMain.fxml:
- <?xml version="1.0" encoding="UTF-8"?>
- <?import javafx.scene.layout.BorderPane?>
- <?import javafx.scene.layout.VBox?>
- <BorderPane fx:id="borderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="pl.karolkluczniok.facture.controllers.MainController">
- <top>
- <VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
- <fx:include fx:id="topMenuButtons" source="TopMenuButtons.fxml" />
- </VBox>
- </top>
- </BorderPane>
- Errory:
- "C:\Program Files\Java\jdk1.8.0_131\bin\java" "-javaagent:D:\1.Programy\16.Intelij\IntelliJ IDEA 2017.2.1\lib\idea_rt.jar=53899:D:\1.Programy\16.Intelij\IntelliJ IDEA 2017.2.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\8.Projekty JAVA\Facture\target\classes" pl.karolkluczniok.facture.Main
- Exception in Application start method
- java.lang.reflect.InvocationTargetException
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
- at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
- Caused by: java.lang.RuntimeException: Exception in Application start method
- at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
- at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
- at java.lang.Thread.run(Thread.java:748)
- Caused by: java.lang.NullPointerException: Location is required.
- at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
- at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
- at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
- at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
- at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
- at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
- at pl.karolkluczniok.facture.Main.start(Main.java:29)
- at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
- at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
- at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
- at java.security.AccessController.doPrivileged(Native Method)
- at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
- at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
- at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
- at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
- ... 1 more
- Exception running application pl.karolkluczniok.facture.Main
- Process finished with exit code 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement