Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Putting JVM arguments in a file to be picked up at runtime

I'm building a jar of my current application, which required several JVM arguments to be set.

Is there a way of setting these JVM arguments in a file rather than on the command line?

I've done some hunting and it looks like I might be able to do something witha java.properties file, possibly by setting a java-args, but I can't find any reference to the format for doing this.

Am I barking up the wrong tree?

Is this possible and if so how?

If not is there some other way to specify the JVM arguments?

like image 500
Omar Kooheji Avatar asked Mar 02 '23 04:03

Omar Kooheji


1 Answers

You could of course write a batch script to execute the JVM. The batch script could look into the file and call with the appropriate parameters. This would be OS dependent though.

like image 128
smack0007 Avatar answered Apr 08 '23 05:04

smack0007