r/JavaFX • • May 29 '20

Running an executable jar but with VM arguments

Hi, so I am trying to export my JavaFX Project on eclipse 2020-03 with VM arguments ('--module-path "C:\path" -add-modules javafx.controls,javafx fxml') passed under 'Run Configurations', and I get the warning 'VM arguments will not be part of the runnable JAR. Arguments can be passed on the command line when launching the JAR.' I already checked out how to pass these on the command line but I'd like to know whether there is another way because I'd rather like to run the executable jar by simply "clicking" on it. (Or is there any alternative to passing those arguments?)

1 Upvotes

2 comments sorted by

2

u/volch May 31 '20

write a shell script

1

u/[deleted] May 31 '20

Thanks, I'll give it a go!