如何将源链接到 eclipse 中的 jar 包? [英] How can I link source to a jar package in eclipse?

查看:29
本文介绍了如何将源链接到 eclipse 中的 jar 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将源代码链接到 Eclipse 中的 jar 包?

How can I link source to a jar package in eclipse?

我正在尝试添加外部库 ch.ntb.usb.

I am trying to add the external library ch.ntb.usb.

我将 jar 文件添加到我的构建路径中,但是当我尝试运行该应用程序时,它返回以下错误:

I added the jar file to my build path, but when I tried to run the application it returned the following error:

jar 文件 ch.ntb.usb 没有源附件.

The jar file ch.ntb.usb has no source attachment.

我用JD-GUI反编译jar文件,里面有源码.

I've used JD-GUI to decompile the jar file and the source code is contained.

推荐答案

在解压 jar 文件后,我使用 jd-gui保存了所有源代码"到我的构建路径中作为 ch.ntb.usb.src.然后我将外部库的源附件设置为ch.ntb.usb.src.这解决了问题.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆