Page 1 of 1

Importing a global options file from command line

Posted: Wed Jun 24, 2009 12:37 pm
by sijomon
Hi,

Are there any command line options, env vars etc I can pass to oxygen to force it to load a global options properties file on start up?

Thanks,

Simon.

Re: Importing a global options file from command line

Posted: Wed Jun 24, 2009 12:51 pm
by sorin_ristache
Hello,

There is no command line option for that. There is only the menu item Import Global Options on the Options menu. Why don't you use project level options if you want to impose a set of options at startup? When the project is loaded automatically at startup the options marked in the Preferences dialog as stored at project level are also initialized with the values loaded from the project file.

Regards,
Sorin

Re: Importing a global options file from command line

Posted: Wed Jun 24, 2009 3:37 pm
by sijomon
Thanks for the suggestion, unfortunatly the users will not be openeing these files in a project, they are opened via a applet/webservice as standalone files, associated with a framework.

If I manually want to overwrite a users global options is it a simple case of exporting a master options file (menu->Export Global Options), and then using this to over write the users options file at <USER_DIR>/Application Data/com.oxygenxml/oxyOptionsSa<VERSION_NUMBER>.xml?

Re: Importing a global options file from command line

Posted: Wed Jun 24, 2009 4:52 pm
by sorin_ristache
No, you cannot overwrite the user options with that action because the export file has other structure. I am sorry, there is a parameter that you can set: the folder where the user options files (oxyOptionsSa<VERSION_NUMBER>.xml) are saved and loaded from can be configured with the startup parameter -Dcom.oxygenxml.ApplicationDataFolder=OPTIONS_FOLDER_NAME where OPTIONS_FOLDER_NAME is the full path of the folder with the options files.


Regards,
Sorin

Re: Importing a global options file from command line

Posted: Wed Jun 24, 2009 5:39 pm
by sijomon
Excellent, I can use this mechanism.

many thanks,

Simon.