Personally I faced a problem while installing netbeans for the first time in my windows 7 os.But at the same time there were no issues while installing it from my workplace which was also on windows 7. I don't know why that happened anyway I wanted to share the solution to all.
First case is when you have your environment variable set correctly and even after restarting the system you get an error message while tryng to install netbeans which says jdk not installed .It also suggests to use the --javahome command ,so here it is
- Start the command prompt and set the path to where your netbeans.exe file exists(Copy it to any of your drives if it is on cd).It may look like D:\Aparna\Softwares>netbeans-7.0.1-ml-windows.exe after this add a 'space' and type --javahome 'space' your path to jdk bin.
D:\Aparna\Softwares>netbeans-7.0.1-ml-windows.exe --javahome "C:\ProgramFiles\Java\ jdk1.7.0_01\bin"
- Press enter and your netbeans will start installation.
The second way as everybody is familiar with is by setting environment variable for java(This didnt work for me in first case ).There are many available resources in the internet explaining how to do it especially the http://java.sun.com .Anyway here is it in my words...
- Right click on MyComputer and select Properties->Advanced System settings.From the bottom right corner select Environment Variables.
- Under system variables select variable with name path and select edit if its existing else create a new variable named path .In variable value paste your path to jdk bin
- C:\Program Files\Java\jdk1.7.0_01\bin;. (Dont forget the ;. at the end)