5

I would like to pass some JVM args to my Gradle bootRun task, namely -Xbootclasspath. I have added:

bootRun {
    systemProperties = System.properties
}

to my build.gradle file, but it doesn't like it when I run:

gw bootRun -Xbootclasspath/p:....

I get the error:

Unknown command-line option '-X'.

Am I perhaps running this incorrectly, or is System.properties not the correct approach for what I am looking?

Oleg
  • 5,925
  • 2
  • 21
  • 38
MeanwhileInHell
  • 6,254
  • 15
  • 52
  • 90

1 Answers1

5

Got it working by using jvmArgs, as detailed in this SO question [ How to pass JVM options from bootRun ]

bootRun {
    jvmArgs = ["-Xbootclasspath/p:<fully-qualified-path-to-jar>"]
}
MeanwhileInHell
  • 6,254
  • 15
  • 52
  • 90