6

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
  • 6,124
  • 2
  • 23
  • 40
MeanwhileInHell
  • 6,780
  • 17
  • 57
  • 106

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,780
  • 17
  • 57
  • 106