Set different jvmArgs for window and linux run script

The application plugin provides solution for set java options by applicationDefaultJvmArgs. But in ouer case we need to use APP_HOME variable value to prepare absolute path for javaagent.

Unfortunately linux and windwos have a different syntax for access to variables. Is there a solution for set different applicationDefaultJvmArgs depends of platform? Maybe extending application plugin api of windowsApplicationDefaultJvmArgs, unitxApplicationDefaultJvmArgs will be acceptable?

Does anyone have an idea how we can do it? :slight_smile:

Can anybody help? This is a strong blocker for us.

I think, the best we can do is to move APP_HOME from to the top and place it after APP_BASE_NAME and then move DEFAUL_JVM_OPTS after all APP_* definitions.
We can do the same thing for Windows easy
Then we could use APP_HOME in plugins that populates DEFAULT_JVM_OPTS, using one if for WIndows/Linux

You can provide your own start script templates to work around your isse. See the DSL guide for CreateStartScripts.

@kamilchm - How do you want use APP_HOME in DEFAULT_JVM_OPTS? Windows and Linux have different syntax for access varible.

@bmuschko - Yes. Of course we can provide own script template. But that will be a huge interference to application plugin. And can break plugins compatibility in the future. We are looking for more soft solution.

Not sure what you mean by “huge interference to application plugin”. Providing a custom template is part of the official public API and will not change “just like that”.