2

I want to pass JVM arguments into a bash script part of the executable jar so that the jar starts with specific configuration. Is there an easy way to do so via gradle spring boot plugin?

yuranos
  • 8,799
  • 9
  • 56
  • 65
  • What do you mean by "a bash script part of the executable jar"? Are you talking about a bash script that executes the jar, or something else? The "part of the executable jar" bit makes me wonder if I understand the question or not. – Jeff Scott Brown Sep 25 '17 at 20:25
  • If you package your fat jar as an executable, it will contain a bunch of bash commands prepended to the jar file itself. You just need to open that jar with any text editor and you'll see. – yuranos Sep 26 '17 at 03:54
  • "it will contain a bunch of bash commands prepended to the jar " - That surprises me. I don't think that happens by default. – Jeff Scott Brown Sep 26 '17 at 13:58
  • Of course it's not a default behavior. You need to explicitly enable it. Otherwise you'll start your application via "java -jar ". – yuranos Sep 26 '17 at 20:35

0 Answers0