AttachSourceToLibrary

How to attach source for Libraries (including Library Wrapper Modules)

Adapted from: http://rubenlaguna.com/wp/2008/02/22/attach-source-code-to-a-netbeans-library-wrapper-module/

To attach source for Jar files you must use Tools -> Libraries and use the New Library wizard. After creating a new library you must:

  1. Select the newly created Library in the left part of the Library Manager
  2. Point to the code jar by using the "Classpath tab" -> "Add JAR/Folder..." button (This is usually a path in your NetBeansProjects folder)
  3. Attach the source jar or folder by using the "Sources tab" -> "Add JAR/Folder..." button

File:2294760814_2676efdcbb_o.png


(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)

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo