1. In Windows XP, right-click on 'My Computer' and select 'Properties'.
2. Click the 'Advanced' tab.
3. Click the 'Environment Variables' button at the bottom.
4. Select the 'Path' system variable in the list and click the edit button.
5. Add the full path you listed above (C:\j2sdk1.4.2_04\bin). All the different paths should be separated by semicolons.
You might need to reboot afterward.
As far as Netbeans goes (I don't know much about it because I don't use it), I would think that it was responsible for the installation of the SDK you found on your hard drive. Maybe it didn't add the installation to your path variable.