Copy plugins between NetBeans installations

NetBeans installer does not migrate plugins, and with every new installation, your old plugins are gone. This makes sense because the new NetBeans installation may not support the old plugins. So you will need to re-install these plugins through update centers or manually installing downloaded *.nbm files.

Another option is to copy the plugin jar and configuration files, from the old .netbeans directory to the new .netbeans directory. For example, this is how I copied whichelement plugin from NetBeans 6.0 to 6.1:
cd $HOME/.netbeans/6.0/modules
cp org-netbeans-modules-whichelement.jar $HOME/.netbeans/6.1/modules/

cd $HOME/.netbeans/6.0/config/Modules/
cp org-netbeans-modules-whichelement.xml $HOME/.netbeans/6.1/config/Modules/
Restart NetBeans and you will see the new plugin is enabled. These copied plugins will always appear installed in Tools | Plugins window, and grayed out. So there is no way to deactivate or uninstall them, since they were not installed with the wizard in the first place. But I guess you can always configure them by editing their config files under .netbeans/6.1/config/Modules. The following is the config file for whichelement (org-netbeans-modules-whichelement.xml):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//NetBeans//DTD Module Status 1.0//EN"
<module name="org.netbeans.modules.whichelement">
<param name="autoload">false</param>
<param name="eager">false</param>
<param name="enabled">true</param>
<param name="jar">modules/org-netbeans-modules-whichelement.jar</param>
<param name="reloadable">false</param>
<param name="specversion">1.5</param>
This is not the recommended approach in most cases and may not work for some plugins. However, it can be useful if you can't find it in update centers or in *.nbm form.

Update on 12/07/2008:
I've copied whichelement plugin from my NetBeans 6.1 installation to 6.5. It works fine so far.


Vinay said...

Nice workaround

Steve Smith said...

Great and Useful Article.

Online Java Training

Java Online Training India

Java Online Course

Java EE course

Java EE training

Best Recommended books for Spring framework

Java Interview Questions

Java Course in Chennai

Java Online Training India

Vũ Diệu Linh said...

I enjoyed on reading your blog post. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Please visit my website, Friv 4000 Games is where all the free friv games.
Friv 4000