Java 项目中的类路径问题

发布于 2024-07-23 14:54:12 字数 282 浏览 3 评论 0原文

我目前正在开发一个使用 Tibco rendezvous 控件的 Java 项目。

我的 build 路径上有 tibrvj.jar 文件。 但我无法看到包“com.tibco.tibrv”中的类。

这个包位于我的构建路径上的 jar 中。

当我尝试打开该包中的类时,类编辑器上显示的消息是:“未找到源。jar 文件 tibrvj.jar 没有源附件”。

有什么办法可以纠正它吗?

I'm currently working on a Java project which uses Tibco rendezvous control.

I have the tibrvj.jar file on my build path. But I'm not able to see the classes which are there in the package "com.tibco.tibrv".

This package is in the jar which is on my build path.

When I try to open the class in that package , the message displayed on class editor is : "Source not found. the jar file tibrvj.jar has no source attachment".

Is there anything that could be done to set it right ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

阪姬 2024-07-30 14:54:12

这看起来像是 IDE 特定的消息。 您使用的是哪个 IDE?

类路径中的 jar 仅包含 java 类(字节码),而不包含源文件(.java 文件)。 您似乎正在尝试在 IDE/编辑器中打开该类。 由于您没有与这些类对应的 java 文件,因此编辑器会抱怨。

由于这些是 Tibco 特定的类,唯一的选择是“反编译”这些类以查看相应的 java 代码。 考虑使用反编译器,例如 DJ Java Decompiler

This looks like an IDE specific message. Which IDE are you using?

The jar in your classpath only contains the java classes (bytecode) and not the source files (.java files). It looks like you are trying to open the class in your IDE/editor. Since you do not have the java files corrsponding to these classes, the editor is comlaining.

As these are Tibco specific classes, the only option is to "decompile" the classes to see the corresponding java code. Consider using a decompiler like DJ Java Decompiler

完美的未来在梦里 2024-07-30 14:54:12

这取决于您所说的“我看不到课程”是什么意思。 如果您的意思是构建失败,则可能是因为实际上没有将其正确地放置在构建路径中(您是如何构建的?)或者可能没有正确的导入。

如果您的意思是看不到源代码,则需要以某种方式获取它(Tibco 是开源的吗?),然后配置您的 IDE,以便它知道源代码在哪里。 当然,您不需要仅仅为了能够构建使用 Tibco 的应用程序而获取资源。

如果您能提供更多关于您所面临的问题以及您正在使用的 IDE(如果有)的更多信息,我们可能会提供更多帮助。

It depends on what you mean by "I'm not able to see the classes." If you mean you're getting build failures, that's possibly a matter of not actually having it properly in your build path (how are you building?) or maybe not having the right imports.

If you mean you can't see the source code, you'll need to get hold of it somehow (is Tibco open source?) and then configure your IDE so that it knows where the source is. Of course you don't need to source just to be able to build your app which uses Tibco.

If you could give more information about exactly which problem you're facing, along with what IDE you're using (if any) we could probably help more.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文