Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSigurjon Johannesson
5,453 PointsExcepiton error
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$154(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at com.teamtreehouse.pomodoro.Main.start(Main.java:15) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Exception running application com.teamtreehouse.pomodoro.Main
This keeps happening to me when I run the code! and can't fix it. Any sugestions?
1 Answer
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 PointsIf you have JDK 11 and you're using Windows 10 you need to download javaFx 11 zip file extract it and save it in a desired location. Then add javaFx libraries to your Pomodoro Project using the project structure.
On the IDE click Run >>> select Edit Configurations >>> and paste the below magic line on >> VM Options >>click Apply.
--module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml,javafx.media
Mindaugas Sertvytis
3,180 Pointshi Tonnie Fanadez i have the same problem and your solution not helping still getting the same error any other suggestions? why most of java courses are out dated and all of the course project files not working because they are to old.... few of courses i had just to watch because no answer to topic and no solutions
Tyler B
5,787 PointsTyler B
5,787 PointsCan you post some of your code to help understand what you're trying to do when getting this error?