Re: How to push new conf file (Was: Non-default Preferences)

Peter Hansson <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAC55jYNAxJY1qGqOiUH6j9mD2ZHpSiVNNjbJtpRp8ku2PLmGsA@mail.gmail.com>
Thanks, appreciated.

Understood, if I embed the new conf file in an NBM then I can attempt to
copy it into location in said module's Installer class.  Is that what you
meant?

Your idea is actually quite workable, because I just learned that the
location of the /etc directory can be overlayed. (see
http://wiki.netbeans.org/FaqNetbeansConf). So all I really need is a way to
get my new conf file into ${userdir}/etc as a one-time action.

So, I appoint one of my existing modules to be the host of the most current
conf file. In that module's Installer class I then check if the latest conf
file is already present in ${userdir}/etc, and if not, I copy it into
place. In the latter case I then ask the user to restart the application.
Unfortunately the check needs to be carried out EVERY TIME the application
starts which is of course unnecessary. Perhaps this can be done cleverly so
that the impact on startup performance is negligible.

/Peter





On Fri, Jan 13, 2017 at 2:28 PM, ortega <[email protected]> wrote:

> Hi Peter.
>
> You try make you personal .conf file and put in nbproject folder.
> The you .conf file must have the same name of your project.
>
> It may be possible to replace the original file programmatically in old
> installations with AutoUpdate.
>
> I hope it helps.
>
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.