java.lang.reflect.InitationTargetException - 确定实际错误?

发布于 2024-08-12 23:44:53 字数 111 浏览 2 评论 0原文

我正在使用 Method.invoke() 调用第三方 jar 中的函数。有时我会抛出 java.lang.reflect.InitationTargetException 。你如何从中找出真正的例外是什么?

I'm using Method.invoke() to call a function in a third party jar. Sometimes I get a java.lang.reflect.InvocationTargetException thrown. How can you figure out what the real exception was from this?

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

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

发布评论

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

评论(1

请持续率性 2024-08-19 23:44:53

IncationTargetException.getCause() 它使用 1.4 中引入的正常异常链接内容

InvocationTargetException.getCause() it uses the normal exception chaining stuff introduced in 1.4

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