You can configure the build options for a certain development configuration that you use in the SAP NetWeaver Developer Studio. This allows you to build sources with different JDK versions. In general the JDK lookup is a two step process. This is required because in SAP NetWeaver Development Infrastructure (NWDI) you have one central development configuration where you want to define which JDK will be used, and the multiple local configurations (CBS or Developer Studio) where the host-specific installation path must be defined.
Note that you should not replace the default Java 5.0 facet (it is always a default facet, regardless of the Developer Studio's JVM) with the Java 6.0 facet. This makes the project JDK 6.0 compatible. Since the AS Java runs on a JDK 5.0-compatible virtual machine, your project will not deploy there. The same is valid if you use the
compliance level option to change the project's JDK compliance to 6.0.