I have two JDK platforms installed in NetBeans - JDK 1.5 and JDK 6. NetBeans itself is running on JDK 6. I am debugging an application via action "Attach Debugger..." and the debugged application is running on JDK 6. When I step through the application, everything works correcty until I step into a class from a JDK - NetBeans opens a source code for the JDK class (which is correct) but from a different JDK (1.5).
Either detect the version of the JDK/JRE automatically or allow the user to quickly switch the JDK platform (at least for the duration of the debugging session).