如何将源代码链接到Eclipse中的jar包? [英] How can I link source to a jar package in eclipse?
问题描述
我正在尝试添加外部库 ch.ntb.usb
。
我将jar文件添加到我的构建路径,但是当我尝试运行应用程序时,它返回以下错误:
jar文件ch.ntb.usb没有源附件。
使用JD-GUI反编译jar文件,并包含源代码。
我用jd- gui进入我的构建路径作为ch.ntb.usb.src解压后的jar文件。然后我将外部库的源附件设置为ch.ntb.usb.src。这解决了这个问题。
How can I link source to a jar package in eclipse?
I am trying to add the external library ch.ntb.usb
.
I added the jar file to my build path, but when I tried to run the application it returned the following error:
The jar file ch.ntb.usb has no source attachment.
I've used JD-GUI to decompile the jar file and the source code is contained.
I "Saved all sources" with jd-gui into my build path as ch.ntb.usb.src after unzipping the jar file. Then I set the source attachment of the external library to ch.ntb.usb.src. This fixed the issue.
这篇关于如何将源代码链接到Eclipse中的jar包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!