隐藏JAR中的公共类 [英] Hide public classes in JAR

查看:178
本文介绍了隐藏JAR中的公共类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道在JAR文件中隐藏公共类的方法。换句话说,有没有办法创建jar-visible类。重点是隐藏我的JAR文件中的公共类,并向我的JAR用户提供对指定类的访问。 F.E.类似的东西在OSGI框架中借助MANIFEST.MF中的Export-Package参数实现

Does anyone know the way to hide public classes in JAR file. In other words is there any way to create "jar-visible" classes. The point is to hide public classes in my JAR file and provide to my JAR-users access to specified classes. F.e. similar thing is implemented in OSGI framework with the help of "Export-Package" parameter in MANIFEST.MF

推荐答案

使用ProGuard(< a href =http://proguard.sourceforge.net/ =nofollow> http://proguard.sourceforge.net/ )lib。

Use ProGuard ( http://proguard.sourceforge.net/ ) lib.

这篇关于隐藏JAR中的公共类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆