To attach source for Jar files you must use Tools -> Libraries and use the New Library wizard. After creating a new library you must:
(More info at Help -> Help contents -> Java Applications -> Debugging Applications -> Attaching Source Code to a JAR File)
If you are trying to attach the source for a Library Wrapper Module then bear in mind that you must point to the <module library wrapper folder>/release/modules/ext/<libraryname>.jar in the Classpath section NOT to the original JAR file location. When you create a Library Wrapper module the library JAR file gets copied to the <module library wrapper folder>/release/modules/ext/ folder and you must attach source to that jar file not the original one (as explained at Help -> Help contents -> Netbeans Modules -> Getting started -> Module and Rich-Client Application Tasks: Quick Reference -> Attach source code to libraries for debugging)