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.
I have a module which needs to perform one-time installation steps when installed via Auto Update. (I need to launch chmod u+x on some files bundled with the modul). I was performing this task in my ModuleInstall#installed method, since I didn't want to do this on every single IDE start. But it turns out installed doesn't get called for the Auto Update scenario. (See issue 95870 for more.) I'm going to work around this by doing my chmod task from restored() but that's not a great permanent solution.
installed() is essentially a leftover from a long-gone revision of the module system which operated under very different circumstances. Generally it should not be used since the notion of "installation" of a module is too ambiguous in the presence of multiple user dirs, shared vs. private installations, version upgrades, installers vs. AU vs. native packaging, etc. Use restored(); you can use various means of checking whether something needs to be done again. For example, an action which needs to be taken once on the userdir can mark a boolean NbPreferences flag, which is written to the userdir. In this case you probably need to use the chmod() trick in restored(); though I would strongly recommend that when running on JDK 6, you use File.canExecute + .setExecutable, which should be far lower overhead. You can also file an RFE for AU to maintain executable status declaratively in NBMs.