0

Every new JavaFx (11 or higher) project under Eclips, requires a VM argument in the "Run Configuration". The information about it is available is the official getting started guide as well as in many SO Q&A such as this one.

How do I automate it ? Have this VM argument added whenever I launch a JavaFx project (but not when I launch a Java project) ?
How can I create a new run configuration template (as explained here) and have it associated with JavaFx projects ?

enter image description here

A similar question had been asked before , with no good answers.
There are also related Q&A (1, 2) but they do not provide the solution I looking for.

c0der
  • 18,467
  • 6
  • 33
  • 65
  • The "default VM arguments" mentioned in both of the Q&A answers does this - what is the problem with that? – greg-449 Oct 24 '20 at 10:37
  • @greg-449 The problem is that default VM arguments are applied to all Java projects, but they are needed only for JavaFx projects. – c0der Oct 24 '20 at 10:40
  • You can have multiple installed JRE entries for the same JVM with different default args – greg-449 Oct 24 '20 at 10:41
  • I thought about installing another JRE but this looks a bit ugly to me. Or can it be done with one JRE ? – c0der Oct 24 '20 at 10:47
  • You can have multiple entries for a single JRE - use the 'Duplicate...' button at the right of the Installed JREs preference page. – greg-449 Oct 24 '20 at 10:51
  • 1
    @greg-449 Thanks. Duplicate and setting unique VM arguments to the other jre reference does work. However I still need to manually select this JRE to each new JavaFx run configuration. – c0der Oct 24 '20 at 12:10

0 Answers0