Alternative to add-exports VM option

941 Views Asked by At

I'm trying to run and help develop a Java project (https://github.com/goxr3plus/XR3Player) with Java-12 and Maven.

According to the README it requires multiple VM options to be set. This one is representative:

--add-exports javafx.base/com.sun.javafx.binding=com.jfoenix

The project has both JavaFX and JFoenix as dependencies. The packages mentioned in add-exports are not packages of the project source, but of the dependencies.

Adding VM options is easy in IntelliJ, but I would prefer to have this setting as a part of the repository. Can Maven or module-info.java be used for this?

According to some sources (https://www.jrebel.com/blog/java-9-modules-cheat-sheet), --add-exports is a command line equivalent of the exports clause of module-info.java.

I've tried to use the export or exports clause in module-info.java, but haven't found anything that is accepted by the IDE. Maybe because the module/package mentioned in the VM option is not part of the sources that the module-info.java cover.

Is there a solution?

0

There are 0 best solutions below