从项目中删除不必要的类
我们使用netbeans在java中开发了一个项目。我们使用bouncycastle(.java类而不是.class)。但问题是我们在org.bouncycastle中只使用了很少的.java类来进行DES等等。
有什么办法或者删除 bouncycastle 包中未使用的类的工具。请为我提供解决方案,
谢谢。
We developed a project in java using netbeans.In that we use bouncycastle (.java classes not .class).But the problem is we used only very few .java classes in org.bouncycastle for DES and soon..
Is there any way or tool to remove unused classes in bouncycastle package..Please provide me a solution
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用名为 proguard 的免费工具,它可以从项目中删除未使用的类。如果您愿意的话,它还可以进行混淆,也可以进行剥离和压缩。非常值得一看。
you can use a free tool called proguard that can remove unused classes from your project. It can also obfuscate if you so desire, and strip and compact as well. Well worth checking out.
我不确定是否要从第三方 API 中删除不必要的类。但您可以对您的项目使用混淆。因为混淆通常会删除预验证器添加到类文件中的必要附加数据。此外,混淆器通常会加载 MIDlet 套件的类文件引用的所有类。有关更多信息,请参阅此链接。
您可以参考NetBeans 中的轻量级 Bouncy Castle。
I'm not sure about removing unnecessary class from third party API. But you can use obfuscating for your project. Because obfuscation usually remove the necessary additional data added by the preverifier to the class files. In addition, obfuscators usually load all classes referenced by your MIDlet suite's class files. For more info see this link.
And you can refer Bouncy Castle Lightweight in NetBeans.