Note: Please refer my previous blog to know about the start-up problem i faced.
After a full day of toiling i finally managed to eliminate the start-up problem that I mentioned in my previous blog.
You may find the following information useful if you ever experience the same problem...
Here is an account of what I actually did:
1. The first and most obvious step in such a situation will be, uninstall the IDE and reinstall it!
Well I did the same thing. But during uninstall I got a message telling me that a .lock file exist in my user directory. But I could not stop the uninstall process and the IDE was successfully uninstalled.
2. Then I installed it again and hoped that everything will work out well... But no!! The same old problem again. So now what to do??
I searched about the ".lock" file and found a useful article (You may want to refer it too).
I found out following:
Immediatelly after startup the launcher will try to create a
lock file in user directory:
$nbuser/lock. If the creation succeeds, the launcher continues to run and allocates a
java.net.ServerSocket on local machine and starts listening on it. After that it writes the port number, plus some randomly generated key into the lock file. To prevent problems with shared directories between multiple computers, also the local IP of the computer is written to the file. When the application is about to exit, it stops listening on the port and deletes the lock file (or the file can be marked as
Start of the Second Instance: When a second instance of the NetBeans is executed over the same user dir, it fails to create the lock file, so instead of launching second instance of NetBeans it opens the file and reads its content to find out the port and secret key for communication with the running NetBeans instance. When read (but this may fail as well, see next section) the launcher connects to the specified port on localhost (may fail as well), verifies that the running instance recognizes the secret key and if so, it refuses to start new instance of NetBeans over this directory.
3. So, now this solves the first puzzle... and I figured out why after restarting the machine,the IDE atleast tried to start for first time(before quitting with exception) and refused to start after that.
4. Now I deleted the .lock file and ran the IDE. It started up, loaded modules and again the EXCEPTION. I found the .lock file created again. Something fishy was going on...
I concluded that the .lock file was being created by the IDE when it was first asked to start after rebooting the system and not being destroyed. Which means that the loader will think that the IDE is still running even though it has crashed due to exception.
5. Then I decided to take a chance and deleted the complete 6.1beta folder at C:\Documents and Settings\jay\.netbeans\
Fingers crossed!!! I double-clicked on the IDE, and hurray!!! The IDE finally woke up and began running. It did ask me if the settings created by previous IDE (6.0 which I have still kept) should be imported (There was also a folder for 6.0 in the path mentioned above). I clicked on no (Out of instinct!).
I still haven't figured out what went wrong but am sure that some settings in the 6.1Beta folder must have gone wrong!! If anybody has a valid answer or resource where I can find the reason for the exceptional exception I will be more than thankful!
Morale of the story: I case your IDE 6.1 Beta refuses to start, giving a null pointer exception, don't panic, dont restart your machine, don't even uninstall the IDE. Just delete the C:\Documents and Settings\username\.netbeans\6.1beta folder!!!!
Crazy, but it works!