threerings / getdown

Download, Install, Update

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JVM error when adding JavaFX modules

dhirwin opened this issue · comments

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

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.