threerings / getdown

Download, Install, Update
Other
507 stars 125 forks source link

JVM error when adding JavaFX modules #264

Open dhirwin opened 2 years ago

dhirwin commented 2 years ago

I'm trying to use the JavaFX toolkit inside of my application. I'm running using OpenJDK 11.0.15 and running on Windows 10 64-bit. Using the latest 1.8.7 version of Getdown.

I have added the following options to my getdown.txt file:

# ---------------------------------------------------------------
# Parameters passed to the JVM
# ---------------------------------------------------------------

jvmarg = -Xms256M
jvmarg = -Xmx1024M
jvmarg = -Djava.library.path=%APPDIR%/lib/native
jvmarg = -Datms.log.type=log4j
jvmarg = -DLOG=logs
jvmarg = -Datms.log.dir=logs
jvmarg = -Datms.log.filename=desktopDecoder.log
jvmarg = -DrootWebUrl=http://10.1.249.13/inet/desktopdecoder
jvmarg = --module-path %APPDIR%/javafx-sdk-11.0.2/lib
jvmarg = --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media,javafx.swing

However, when I compile and run the application I get a popup saying that the JVM can't be started (Error: Could not create the Java Virtual Machine) and the following error in the launcher.log file:

Unrecognized option: --module-path C:\path\to\./javafx-sdk-11.0.2/lib

Strangely enough, I tried taking the complete command line from the launcher.log file and ran it in a separate command prompt and had no issues starting the application using that approach. I tried single and double quoting the --module-path and --add-modules options but nothing worked.

Thanks, Dave

samskivert commented 2 years ago

jvmarg is needed for each individual argument. I think you need:

jvmarg = --module-path
jvmarg = %APPDIR%/javafx-sdk-11.0.2/lib

and so forth. Because those are really two arguments due to being separated by a space.