Thursday, December 4, 2008

Nuts with NetBeans

My first attempts at developing applications in the NetBeans environment were back in February when I first loaded version 6.0 on my laptop. I was trying to understand the Web Services projects that my team members had been developing using NetBeans. The first project I was given to play with had been built using NetBeans 5.5. I was forewarned that I would see an error message associated with libraries and that "all" I needed to do was get rid of the reference to JAXWS20 because the JAX-WS libraries were included with JDK6. To this day, I don't understand all the implications of what happened when Sun started including those libraries with JDK6. Getting my coworker's project to compile wasn't as easy as his email implied. At one point I posted to a forum http://forums.sun.com/thread.jspa?messageID=10116236 which was never satisfactorily answered and now I can't remember anymore what workaround I finally came up with.

From those initial installs of 6.0, to get needed features that kept coming up, I've gone through 6.0.1, 6.1, 6.5 Beta, and now 6.5. I dread it every time that I have to install a new version. To get around some of the problems I have had to delete the .nbi and .netbean directories, which, I think, causes problems later on when you try to uninstall. A week or so ago I wanted to install 6.5 on a laptop where I had both 6.0.1 and 6.1 installed. I'd been using the 6.1 for quite awhile and wasn't ready to get rid of it. On the other hand, things on the laptop were getting a bit cluttered. I decided I would uninstall the 6.0.1, leave the 6.1 and install 6.5.

After selecting Remove in the Windows Add/Remove Programs GUI, a popup message appeared: "Missing target component. The specified target component - nb-base/6.0.1.1.200801291616 was not found in the registry. The installer can continue as if the target component was not specified." The options for the popup were Yes to continue, No to exit. Regardless of which option I chose the installer exited without uninstalling NetBeans 6.0.1. After trying with the Windows Add/Remove Programs, I used the uninstall.exe in the NetBeans 6.0.1 folder, but the behavior was the same.

I've had some success finding answers through Sun user forums for problems with Portlet Container, Glassfish, WSRP, etc., and decided to send an email to nbusers@netbeans.org. After several days of getting no response I decided to experiment and see what I could learn. But you know how it is when you think the answer is just around the corner. I was sure that if I copied and renamed the right combination of .netbeans folders and tweaked the registry.xml I could get the 6.0.1 version back into a state where the uninstaller would be able to cleanly get rid of it. I think I was worrying too much about uninstalling the correct way.

I finally gave up and went back to looking at the forum. It was then that I realized this forum did not work like the others. I had been expecting that when someone responded to my question an email would get sent to the address I had used to send the question. Instead, I saw that someone had responded to my question shortly after it was posted. Basically, the response recommended just deleting the appropriate folders as the way to uninstall. And all this time I had believed what the documentation said "Use the Add/Remove Programs utility. Do not manually delete the directories and files."

But you do what you have to do to keep going. So I deleted all (hopefully) the appropriate folders. I tried to use the registry cleaning utility recommended by the forum post but it didn't do much that I could see. I'm sure there are bits and pieces of NetBeans 6.0.1 hanging around yet on my laptop.

No comments: