I also had the same problem. So I tried by installing a lesser version say jdk1.5 and running the netbeans installation from command prompt as:
Linux: netbeans-5_5-linux.bin -is:javahome /usr/jdk/jdk1.5.0_06
Windows: netbeans-5_5-windows.exe -is:javahome "C:\Program Files\Java\jdk1.5.0_06"
Hope it helps