This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199515 - Awkward to customize launch parameters of a NBP application
Summary: Awkward to customize launch parameters of a NBP application
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 22:25 UTC by fabien_nisol
Modified: 2013-01-10 08:15 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fabien_nisol 2011-06-17 22:25:50 UTC
the etc/${app}.conf default_options cannot be customized to alter memory or anyother relevant parameter.

It could be easily implemented by modifying the build-launchers target to build include parameters

for example, app.conf could contain a line like this:

default_options="--branding ${branding.token} -J-Xms24m -J-Xmx64m ${default_options.extra.args}"

the default_options.extra.args property could then be defined in platform.properties in order to be replaced within build-launcher target 

<replaceregexp file="${build.launcher.dir}/etc/${app.name}.conf"
                        match="(default_options=&quot;)(.*)(&quot;)"
                        replace="\1\2 ${default_option.extra.args}\3"/>
Comment 1 Antonin Nebuzelsky 2011-06-20 11:14:44 UTC
You can specify a path to your own .conf file in project.properties via "app.conf" option and then the result .conf file after you rebuilt will be this one, not the default one from harness.

Though this is not too straightforward.

Reassing to apisupport for evaluation.
Comment 2 fabien_nisol 2011-06-20 16:47:10 UTC
You're absolutely right, I did not think of that. The property app.conf can definitely be defined to refer to another file.

However, I still think that some kind of UI in project properties would be useful, at least to the variables that are configurable in the app.conf file (eg all System properties modifying the behaviour of NBP, like netbeans.winsys.* properties)
Comment 3 Jesse Glick 2011-06-27 18:57:56 UTC
It has been suggested to include ${run.args.extra} in default_options (after "--branding ${branding.token}"). This is probably the most intuitive behavior; though some users might have run args used only for testing, e.g. "-J-Dmy.pkg.level=FINE", or "-J-XX:+HeapDumpOnOutOfMemoryError -J-XX:HeapDumpPath=/tmp/dump", which would be inappropriate to include in the packaged app.
Comment 4 Jaroslav Tulach 2013-01-10 08:15:32 UTC
Awkward but possible. Just app.conf property. As far as the magic suggested in comment 3 goes - it is a bit too fragile, and can cause more pain than gain. Closing, viable alternative exists and is documented.