mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

Consider bundling javafx libraries for better compatibility

Open birkett83 opened this issue 2 years ago • 13 comments

On Debian there are official packages for openjdk 11 and openjdk 17. Debian provides javafx packages compatible with openjdk 11, but not for openjdk 17. Since mcaselctor requires both java 17 and javafx, there's no easy way to run it on debian. This may apply to other linux distros such as ubuntu but I've not tested them.

To Reproduce using debian's openjdk11 packages:

	java.lang.UnsupportedClassVersionError: net/querz/mcaselector/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

using debian's openjdk17 packages: Please install JavaFX for your Java version (17.0.3) to run MCA selector

Expected behavior It would be great if you could bundle JavaFX in your build of MCA selector so you don't need to install JavaFX separately. Various forum posts suggest this is the preferred option for using JavaFX on recent versions of java.

birkett83 avatar Jun 18 '22 11:06 birkett83

Also having the same issue on windows. Further complicated because you can't download the JavaFX 17.0.3 setup for free anymore off of the website linked in the wiki.

theslysyl avatar Jun 19 '22 01:06 theslysyl

Can confirm Linux Mint 20.3 has the same problem

slayer3032 avatar Jun 23 '22 06:06 slayer3032

Please try my MCA Selector installer for Ubuntu and tell me if it worked for you.

mk-pmb avatar Jun 26 '22 18:06 mk-pmb

Can confirm on PopOS 22.04. Using Wine doesn't work either because the installation stops with this error:

image

Even when I navigate to the application and open it with Wine manually, it refuses to open.

Please end my suffering by implementing this.

IAmEchino avatar Jun 29 '22 02:06 IAmEchino

Please try my MCA Selector installer for Ubuntu and tell me if it worked for you.

Unfortunately it didn't, but I left an issue report on your git with the problem. Thanks for putting this together though! I really appreciate it! : )

EDIT: It works now!

IAmEchino avatar Jun 29 '22 03:06 IAmEchino

Same Issue on macOS Monterey M1 Screen Shot 2022-06-30 at 10 35 41 AM

ic22487 avatar Jun 30 '22 15:06 ic22487

Same Issue on macOS Monterey M1 Screen Shot 2022-06-30 at 10 35 41 AM

Same issue. I've followed a few tutorials to install this with no success.

DaddyBones avatar Jul 01 '22 23:07 DaddyBones

Same issue Screen Shot 2022-08-11 at 6 31 03 PM

Was able to get it working by installing the matching JFX version on my machine and pointing to it.

  1. Install JavaFX for your version of he JDK - https://gluonhq.com/products/javafx/
  2. Update bash profile to set the right JAVA_HOME and add a line for JFX.
  3. Execute the jar with JFX controls.

.bash_profile

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-18.0.2.jdk/Contents/Home
export JFX=~/java/javafx-sdk-18.0.2/lib

Run

java -jar --module-path $JFX --add-modules javafx.controls ~/Minecraft/mcaselector-2.1.jar

Xerosigma avatar Aug 11 '22 23:08 Xerosigma

I believe I am having the same issue on my MacOs Monterey 12.4, as others have also said. I was wondering has anyone found a fix? Am I missing something simple? I tried to look up how to download JavaFX but didn't really get a good tutorial. Is it that simple to just download JavaFX, which to me isn't simple as I've been pulling my hair out for sometime trying to figure out how to do it. Installing java 17 or 18 was very straight forward but the videos I found on Java FX seem like they are doing a lot of extra stuff I'm a little apprehensive to try as I don't want to mess anything up. Someone please help!

Chrisspy36 avatar Aug 28 '22 07:08 Chrisspy36

I found I needed the Zulu JRE-FX 18 and even though I am on an M1, the M1 version did not work for me. Once installed, when I clicked on the MCA Selector file to open MCA Selector, but I got an error saying it can't find the correct folder, and will gave me the name of the folder the program is looking for. I simply renamed the Zulu folder name to the folder name MCA Selector was looking for and it worked.

DaddyBones avatar Aug 28 '22 17:08 DaddyBones

@Querz Any input on this?

It seems impossible to get mcaselector working with the standard JRE/JDK solutions on various distros, and not bundling JavaFX is as mentioned above not standard for Java applications. It only seems to work out of the box on Windows.

I've tried with OpenJDK with OpenJFX separately installed, which mcaselector doesn't seem to understand. It also doesn't work with Oracle's own JRE/JDK which bundles JavaFX, nor with the Zulu thing that is mentioned in the wiki.

The only thing that works is manually downloading JavaFX and adding --module-path as mentioned in a comment above in this issue, which is far from ideal.

Sharparam avatar Apr 22 '24 16:04 Sharparam