So lets say there is an application with wrapper that executes ${jre}/bin/java -jar/cp ...
And I want to run this application specifying some custom jvm option such as -Xmx, which must be specified between java and -jar/-cp. Nearly all the java application are packaged in way, which makes it impossible. Like in example below:
I thought of two ways, either adding options as package function arguments, or adding JAVA_OPTS to wrapper. Later approach seem more flexible. But I only was able to find 1 package that used this approach.
What is the common approach to deal with setting custom JVM options?
I could do that, but than I would have to replicate all the options passed in the wrapper. Also, if it’s a CLI app, I would have to make a custom wrapper and make it available in Path. I mean it’s a solution, but I am wondering if there is any cleaner way to this.