Attach source code to a Netbeans Library Wrapper Module

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

I’m new in NetBeans and today I’ve been struggling a couple of hours with the simple task of attaching the source code for an external JAR (NetBean Library Wrapper Module).

 

 

I’ve been trying to find in google how to do it without success until I reached this post in the netbeans-users mailing list.

Then I realized that I should been looking into the NetBeans Help first. The entry at Help → Help contents → Java Applications → Debugging Applications → Attaching Source Code to a JAR File explains how to do it.

first go to Tools→Libraries to open the Library Manager. Then click on New Library. Give it a name and select the jar. +But you should be careful when adding the Library, though. You must point to the JAR file INSIDE your module library wrapper (that’s <module library wrapper folder>/release/modules/ext/) NOT to the original location of the JAR. (As pointed out in the Help → Help contents → Netbeans Modules → Getting started → Module and Rich-Client Application Tasks: Quick Reference → Attach source code to libraries for debugging.)

 

 

 

 

Then you should add the library’s source folder in the Source tab of the Library in the Library Manager (you can point to the Javadoc as well).

NOTE: If you plan to attached the sources to the jar because you would like to stepping into the library’s code while debugging, or set a breakpoint in the jar, then you should make sure that the sources are marked for debugging. What?!? Yes, I know. This sounds weird but you have to do it. Start the debugging session in Netbeans open the Sources window (Window→Debugging→Sources) and locate the sources folder in the table, check the box “Use for debugging”.

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/cuizhf/archive/2011/08/22/2149901.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值