Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error when doing the tP tutorial 2 #436

Open
minhkiwi14 opened this issue Mar 6, 2025 · 7 comments
Open

Strange error when doing the tP tutorial 2 #436

minhkiwi14 opened this issue Mar 6, 2025 · 7 comments

Comments

@minhkiwi14
Copy link

Hi, I am doing the second tutorial for the tP in week 6. When I tried running Main#main, it throws the following error:

Mar 07, 2025 12:20:45 AM seedu.address.Main main
WARNING: The warning about Unsupported JavaFX configuration below (if any) can be ignored.
Mar 07, 2025 12:20:45 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @5cca7163'
Graphics Device initialization failed for :  d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:266)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:278)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
	at java.base/java.lang.Thread.run(Thread.java:833)

Process finished with exit code 1

Does anyone know why it happens, and how can I fix it? Thanks!

@damithc
Copy link
Contributor

damithc commented Mar 6, 2025

While waiting for inputs from peers, perhaps share the following info?

  • Which OS are you on?
  • Are you running the app using .\gradlew run? If not, what happens when you do that?
  • What's the output for java -version in the same terminal you ran the .\gradlew run command?
  • Are you able to run the original AB3 jar file from https://github.com/se-edu/addressbook-level3/releases ?

@minhkiwi14
Copy link
Author

minhkiwi14 commented Mar 6, 2025

@damithc Hi Prof,

  • I am using Windows 11.
  • I right-clicked on the Main class and clicked "Run Main.main()". Then the error appears as above.

Image

  • This is what I got, which is very normal.
java version "17.0.14" 2025-01-21 LTS
Java(TM) SE Runtime Environment (build 17.0.14+8-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.14+8-LTS-191, mixed mode, sharing)
  • Yes.

@damithc
Copy link
Contributor

damithc commented Mar 6, 2025

  • Are you running the app using .\gradlew run? If not, what happens when you do that?

@minhkiwi14
Copy link
Author

  • Are you running the app using .\gradlew run? If not, what happens when you do that?

Hi Prof, I tried ./gradlew run shadowJar and it works. But I still want to know why running Main#main (instead of building a .jar file) does not work.

@damithc
Copy link
Contributor

damithc commented Mar 6, 2025

Hi Prof, I tried ./gradlew run shadowJar and it works. But I still want to know why running Main#main (instead of building a .jar file) does not work.

@minhkiwi14 ./gradlew run not ./gradlew run shadowJar

Somewhat similar issue #419

@minhkiwi14
Copy link
Author

@damithc Hi Prof, I just tried and it gave the same desired result.

@damithc
Copy link
Contributor

damithc commented Mar 7, 2025

@minhkiwi14 You may want to run through this guide to ensure you set up the project in IntelliJ correctly. In particular, step 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants