Bonjour,
Je suit un cours de java et j’essaie de lancer une premier interface créer avec scenebuilder, mais j'ai un message d'erreur sur internet ça dit c'est un problème de chemin, mais mon chemin est correct.
jdk1.8 choisi pour eclipse
chemin spécifier pour le fichier FXML :j'ai le message d'erreur suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part loader.setLocation(MainClass.class.getResource("/ConteneurPrincipal.fxml"))
Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 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$159(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Location is not set. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) at ma.sitebadr.view.MainClass.initialisationContenu(MainClass.java:59) at ma.sitebadr.view.MainClass.start(MainClass.java:30) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$166(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(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$152(WinApplication.java:177) ... 1 more Exception running application ma.sitebadr.view.MainClass
Partager