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

Fails to find JavaFX (21, 23) #518

Open
txtsd opened this issue Jan 22, 2025 · 4 comments
Open

Fails to find JavaFX (21, 23) #518

txtsd opened this issue Jan 22, 2025 · 4 comments

Comments

@txtsd
Copy link

txtsd commented Jan 22, 2025

Describe the bug
Even with openjfx 21 and openjfx 23 installed, mca selector fails to find it and refuses to start.

To Reproduce
Steps to reproduce the behavior:

  1. Install jre/jdk 21
  2. Install openjfx 21
  3. Ty to start mca selector
  4. See JavaFX missing error

Expected behavior
mca selector should be able to find and use openjfx

Screenshots and other files
Image

Environment (please complete the following information):

  • OS: Arch Linux
  • Java version: 21.0.5
  • Version of MCA Selector: 2.4.2
@txtsd
Copy link
Author

txtsd commented Jan 22, 2025

Managed to get it to work. I had to manually locate the libraries like so:

java --module-path "${JAVA_HOME}/lib/javafx.base.jar:${JAVA_HOME}/lib/javafx.fxml.jar:${JAVA_HOME}/lib/javafx.graphics.jar:${JAVA_HOME}/lib/javafx.media.jar:${JAVA_HOME}/lib/javafx.swing.jar:${JAVA_HOME}/lib/javafx.web.jar:${JAVA_HOME}/lib/javafx.controls.jar" --add-modules=javafx.base --add-modules=javafx.fxml --add-modules=javafx.graphics --add-modules=javafx.media --add-modules=javafx.swing --add-modules=javafx.web --add-modules=javafx.controls -jar mcaselector-2.4.2.jar

Perhaps including a bash script that does this alongside the jar file would be a good idea.

@TheIronPineApple
Copy link

TheIronPineApple commented Jan 25, 2025

Managed to get it to work. I had to manually locate the libraries like so:

java --module-path "${JAVA_HOME}/lib/javafx.base.jar:${JAVA_HOME}/lib/javafx.fxml.jar:${JAVA_HOME}/lib/javafx.graphics.jar:${JAVA_HOME}/lib/javafx.media.jar:${JAVA_HOME}/lib/javafx.swing.jar:${JAVA_HOME}/lib/javafx.web.jar:${JAVA_HOME}/lib/javafx.controls.jar" --add-modules=javafx.base --add-modules=javafx.fxml --add-modules=javafx.graphics --add-modules=javafx.media --add-modules=javafx.swing --add-modules=javafx.web --add-modules=javafx.controls -jar mcaselector-2.4.2.jar

Perhaps including a bash script that does this alongside the jar file would be a good idea.

Where can I put this code you send so it will work on my end where I am experiencing the same issue? I am on windows though is the difference.

@txtsd
Copy link
Author

txtsd commented Jan 25, 2025

Managed to get it to work. I had to manually locate the libraries like so:

java --module-path "${JAVA_HOME}/lib/javafx.base.jar:${JAVA_HOME}/lib/javafx.fxml.jar:${JAVA_HOME}/lib/javafx.graphics.jar:${JAVA_HOME}/lib/javafx.media.jar:${JAVA_HOME}/lib/javafx.swing.jar:${JAVA_HOME}/lib/javafx.web.jar:${JAVA_HOME}/lib/javafx.controls.jar" --add-modules=javafx.base --add-modules=javafx.fxml --add-modules=javafx.graphics --add-modules=javafx.media --add-modules=javafx.swing --add-modules=javafx.web --add-modules=javafx.controls -jar mcaselector-2.4.2.jar

Perhaps including a bash script that does this alongside the jar file would be a good idea.

Where can I put this code you send so it will work on my end where I am experiencing the same issue? I am on windows though is the difference.

You will have to make a .bat file to put this in. You will also have to replace the paths to resemble how they are on windows.

@leagris
Copy link

leagris commented Jan 25, 2025

Does not even work either way:

java --module-path "/usr/share/openjfx/lib/javafx.base.jar:/usr/share/openjfx/lib/javafx.fxml.jar:/usr/share/openjfx/lib/javafx.graphics.jar:/usr/share/openjfx/lib/javafx.media.jar:/usr/share/openjfx/lib/javafx.swing.jar:/usr/share/openjfx/lib/javafx.web.jar:/usr/share/openjfx/lib/javafx.controls.jar" --add-modules=javafx.base --add-modules=javafx.fxml --add-modules=javafx.graphics --add-modules=javafx.media --add-modules=javafx.swing --add-modules=javafx.web --add-modules=javafx.controls -jar mcaselector-2.4.2.jar 
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NoSuchMethodError: 'void javafx.scene.canvas.GraphicsContext.setImageSmoothing(boolean)'
	at net.querz.mcaselector.tile.TileMap.<init>(TileMap.java:119)
	at net.querz.mcaselector.ui.Window.start(Window.java:48)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	... 1 more

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

No branches or pull requests

3 participants