-3

I just followed the tutorials given from the official documentation here.

What i've tried so far is:

  1. Creating New Java App Project

  2. Adding the Jar (JavaFX) into the libraries

  3. Creating Controller (1), Main.java (1), and also Layout (1 fxml)

  4. Adding VM Options -> Run with the following arguments:

    --module-path "D:\backedup_download\sourceCode\java\javafx\javafx-sdk-18.0.1\lib" --add-modules javafx.controls,javafx.fxml

But it's very funny! The Java output error telling me about my graphics card version as it's outdated?! What the....??!

ant -f D:\\java\\desktop\\BioskopRakyat -Dnb.internal.action.name=run run
init:
Deleting: D:\java\desktop\BioskopRakyat\build\built-jar.properties
deps-jar:
Updating property file: D:\java\desktop\BioskopRakyat\build\built-jar.properties
compile:
run:
Device "Intel(R) HD Graphics 3000" (\\.\DISPLAY1) initialization failed : 
WARNING: bad driver version detected, device disabled. Please update your driver to at least version 8.15.10.2302
Exception in Application start method
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at javafx.graphics@18.0.1/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:465)
    at javafx.graphics@18.0.1/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at javafx.graphics@18.0.1/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:901)
    at javafx.graphics@18.0.1/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException: Location is required.
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3324)
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3287)
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3255)
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3227)
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3203)
    at javafx.fxml@18.0.1/javafx.fxml.FXMLLoader.load(FXMLLoader.java:3196)
    at samples.Main.start(Main.java:18)
    at javafx.graphics@18.0.1/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
    at javafx.graphics@18.0.1/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
    at javafx.graphics@18.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics@18.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at javafx.graphics@18.0.1/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics@18.0.1/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics@18.0.1/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    ... 1 more
Exception running application samples.Main
D:\java\desktop\BioskopRakyat\nbproject\build-impl.xml:1330: The following error occurred while executing this line:
D:\java\desktop\BioskopRakyat\nbproject\build-impl.xml:936: Java returned: 1
BUILD FAILED (total time: 1 second)

Why the JavaFX telling me about the graphic card is outdated? I have my latest version as shown:

this is valid version 9.17.x

any clue on this matters CMIIW?

My current specs (in which i'm currently running other projects very well) are:

  • Java OpenSDK 11
  • Netbeans 12.2
  • RAM 8GB with HDD 500 GB
  • free space still 75% fresh! (i don't need to write this, do i)?
gumuruh
  • 2,502
  • 4
  • 31
  • 52
  • 3
    Post the console output as text, formatted as code. If the exception that follows the warning is related to your question, include the complete stack trace. (If not, omit it entirely.) – James_D May 19 '22 at 13:44
  • i did already. any solutions? – gumuruh May 19 '22 at 16:08
  • The warning is probably not stopping your code from running. Please have a look at `Caused by: java.lang.NullPointerException: Location is required.` in your error message. – SedJ601 May 19 '22 at 16:39
  • 1
    Are you using `Ant`, `Maven`, or `Gradle`? – SedJ601 May 19 '22 at 16:43
  • 3
    The stack trace simply says the path to your FXML is wrong, and has nothing to do with the driver warning. See https://stackoverflow.com/questions/61531317/how-do-i-determine-the-correct-path-for-fxml-files-css-files-images-and-other – James_D May 19 '22 at 17:16
  • OMG. so the graphic driver isn't the main case? Why did they pop it out if there's no importance of it? Okay, you're right... i put the wrong fxml naming.... thanks @James_D! – gumuruh May 19 '22 at 17:22
  • It's a warning. It says "WARNING" in all caps, which clearly indicates it is not an error. You should read the stack trace before posting here; it clearly indicates the error occurs on line 18 of your `Main.java` code, which is where you call `FXMLLoader.load()`. – James_D May 19 '22 at 17:23
  • [how to read stacktrace](https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace#:~:text=To%20read%20this%20stack%20trace,something%20in%20the%20package%20com.) – Giovanni Contreras May 19 '22 at 20:25

0 Answers0