By Teera Kanokkanjanarat
Netbeans allows you to bundle up related jar files together as a class library and apply them to any other projects. While it is easy to create, use, and remove class libraries, moving them from one version of Netbeans to another is not a trivial task.
By default, Netbeans will ask you if you want to import settings from previous version on the first time installation. However, it does not give you enough flexibility. For example, if you want to go back to previous stable version of Netbean,s how can you migrate new class libraries you have created on the newer version? Recreating all libraries over again can take quite an amount of time. Surely there must be an easy way to get around this problem.
First, we will have to locate where different versions of Netbeans have been installed on your computer.
1. Make sure that you still have the user directory from the version of the IDE containing class liraries on your system in its default install location.
2. On Microsoft Windows systems, Netbeans default installation location is C:\Documents and Settings\<username>\.netbeans\<version-number>\. On UNIX and Linux systems, the default location is /<home>/<username>/.netbeans/<version-number>/.
3. If the new version of the IDE is running, exit the IDE.
At this point, we have located where Netbeans store configuration file for class libraries the user have created. We will now go ahead and copying those library config files to new version of Netbeans.
1. Under "<home>/<username>/.netbeans/<previous version number>/config" folder, look for a folder "org-netbeans-api-project-libraries". This will be the place where all class libraries information of that Netbeans version are stored.
Figure 1: Figure 1: Locating config folder.

Figure 2: Locating org-netbeans-api-project-libraries under config folder.
2. Under this folder, you'll find another folder name "Libraries" which store a bunch of XML files describing each of all class libraries you've created.
Figure 3: Locating Libraries folder where class libraries XML config files are stored.
3. To port these libraries to other version of Netbeans, simply copy these XML files to corresponding "<home>/<username>/.netbeans/<destination version number>/config/org-netbeans-project-libraries/Library" and that's done.
Figure 3: Copying XML config files for class libraries you want, and put them on corresponding folder of the new Netbeans version.
4. Start Netbeans IDE and you will see that your class libraries have been copied from previous version.
Netbeans store user setting and preferences in XML format. This allows flexibility and readability for user to make change and understand these configuration files. This tutorial shows you how to go in and perform a quick migration of class libraries without having to re-install the IDE. You can also apply the same concept to other configuration items (for instance database connection info) as well.
By Top8: (2008-JAN-28) I have used this approach in many platform upgrades, and it always worked. Thank you for that. I can live without the GUI, but I always forget where the config files are. This articles gives you the exact location.
| apserverstartupscaled.png | ![]() |
54316 bytes |
| flash_demo_button_med.gif | ![]() |
1372 bytes |
| loanrequestorproj.png | ![]() |
4073 bytes |
| nbimportlibrary1.png | ![]() |
78648 bytes |
| nbimportlibrary2.png | ![]() |
84901 bytes |
| nbimportlibrary3.png | ![]() |
76976 bytes |
| nbimportlibrary4.png | ![]() |
86312 bytes |
| pdficon_small.html | ![]() |
549 bytes |