Make sure you configure the application configuration file
{application, fred, [{description, "Your application"}, {vsn, "1.0"}, {modules, []}, {registered,[]}, {applications, [kernel,stdlib]}, {env, [ {param, 'fred'} ] ...
and then you can set your command line as follows:
-fred param 'billy'
I think you need to have a parameter in your application configuration in order to do this - I never did it differently ...
Additional information (easier than tagging it in a comment)
Considering this
{emxconfig, {ets, [{keypos, 2}]}},
I can do it:
{ok, {StorageType, Config}} = application:get_env(emxconfig),
but (and this may be important) my application starts at this time (in fact, it may just be necessary to download and not actually start by looking at the application_controller code).
Alan moore
source share