无法从应用程序 jar 访问 BouncyCastle jar
我已经为我的应用程序制作了 jar 文件。 我的应用程序的类之一使用 BC jar 的 BouncyCastleProvider 类。
我在我的应用程序 jar 所在的同一父文件夹中创建了一个文件夹“lib”。
我已经更改了我的计算机 CLASSPATH 以指向这个新的 lib 文件夹。 但是当我运行我的应用程序时,它给了我 classnotfound 异常。
但是如果我将这个 BC jar 文件复制到我的 jre/lib/ext 中,那么一切都会正常工作。
谁能告诉我需要做什么才能从 lib 目录访问 BC jar 文件?
提前致谢, 杰尼什
I have made jar file for my application. One of the class of my application uses BouncyCastleProvider class of BC jar.
I have created one folder "lib" in the same parent folder where my application jar is residing.
I have changed my machine CLASSPATH to point to this new lib folder. But when I run my application it gives me classnotfound exception.
But if I copy this BC jar file to my jre/lib/ext then everything works fine.
Can anybody tell me what I need to do to access BC jar file from my lib directory?
Thanks in Advance,
Jenish
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 JAR 文件必须设置其 MANIFEST.MF 文件以声明 JAR 的类路径。 #
摘自 Sun 教程 下面,在您的情况下,您只需使 Class-Path 指令指向您的 lib 目录,大概
Your JAR file must have its MANIFEST.MF file set to declare the classpath for the JAR.#
Extract from the Sun Tutorial below, in your case you just need to make the Class-Path directive point to your lib directory, presumably