How to set Sun’s java platform as the default java platform in Netbeans

I realized that in Netbeans the default Java platform for the projects was not the Sun’s and it was not possible to change this setting by using some features of NetBeans, but I had to manually edit a configuration file.