在 Eclipse 中链接 Cassandra 和 Thrift 源时遇到问题
我在 eclipse 3.4 中使用 Cassandra (0.7.2) 和 Thrift (0.7),但在链接源文件时遇到问题。我使用 ant 构建了 Thrift 和 Cassandra,在构建 Cassandra 后,build/lib 下有一个源目录,其中包含源 .jar。不幸的是,即使将它们链接到 eclipse 中,我仍然看不到任何内容的来源。要添加源,我将构建路径 -> 源选项卡 -> 链接源(此处我选择包含源 jar 的源文件夹)。我还尝试过按住 ctrl 键单击类,这些类抱怨找不到附加源,并且我尝试通过提供的浏览按钮指定源路径。仍然不走运,
我对 Eclipse 有点陌生,所以这肯定可能是我的用户错误。有什么指示或技巧吗?
非常感谢
I am using Cassandra (0.7.2) and Thrift (0.7) with eclipse 3.4 and having trouble getting the source files linked in. I have built both Thrift and Cassandra using ant, after building Cassandra there is a sources directory under build/lib which contains source .jars. Unfortunately even after linking these into eclipse, I still can not see the source for anything. To add sources I am going to build path->sources tab->link source (here I select the source folder containing the source jars). I have also tried ctrl-clicking on classes, which complain that no attached source could be found, and I try to specify the source path via the browse button provided. Still no luck
I am a bit new to eclipse, so it certainly could be user error on my part. Any pointers or tips?
Thanks so much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我总是这样设置源:
Properties > Java 构建路径 > “库”选项卡
,展开 Jar,选择“源附件”,单击“编辑”,然后选择 Jar 的源 Jar 或 Zip 文件。I always set up the source like this:
Properties > Java Build Path > Libraries tab
, expand the Jar, select 'Source attachment', click 'Edit', and select the source Jar or Zip file for the Jar.还有一个正在积极维护的“generate-eclipse-files”ant 目标。如果这对您来说不是开箱即用的,那么它就是一个问题的候选者。
There is also a 'generate-eclipse-files' ant target actively maintained. If that does not work out of the box for you, then it is a candidate for an issue.