You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$app_mainclass and $app_commands must be placed after all arguments (both JVM & system properties), otherwise it won't work. This is simply how java command works.
Unfortunately we really don't know what the motivations of @dhoepelman were on that PR.
The text was updated successfully, but these errors were encountered:
I guess the confusion comes from the way loadConfig works. The problem is that you can write java options and application arguments into the config file.
So the first change
# if configuration files exist, prepend their contents to $@ so it can be processed by this runner
[ -f"$script_conf_file" ] &&set -- $(loadConfigFile "$script_conf_file")"$@"
java -classpath $app_classpath"$@"$app_mainclass
was working if you put app arguments in the config file. The second change by @dhoepelman fixes the argument problem by putting the config content in a separate variable $opts. However this breaks if the config fail contains application arguments.
# If a configuration file exist, read the contents to $opts
[ -f"$script_conf_file" ] &&set -- $(loadConfigFile "$script_conf_file")"$opts"
java -classpath $app_classpath$opts$app_mainclass$@
The bash scripthas logic implemented to separatejava options from application arguments. This is missing the ash script, why every change will break something else.
In order to fix these, we need to mimic this behaviour.
This PR broke the feature and was integrated into 1.1.0:
#766
Simply placing
$@
before the$app_mainclass
fixes it. An example of fully working command line would be (using latest version as template):$app_mainclass
and$app_commands
must be placed after all arguments (both JVM & system properties), otherwise it won't work. This is simply howjava
command works.Unfortunately we really don't know what the motivations of @dhoepelman were on that PR.
The text was updated successfully, but these errors were encountered: