如何使Proguard对jar文件中的jar进行混淆 [英] How to make Proguard to obfuscate jars within a jar file

查看:895
本文介绍了如何使Proguard对jar文件中的jar进行混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可运行的Java jar文件,我们将其称为masterProgram.jar. 在此masterProgram.jar内,如果我使用7Zip或WinRAR提取它,则还有其他jar,请将其称为lib1.jar, lib2.jar.

I have a run-able java jar file let's call it masterProgram.jar. Inside this masterProgram.jar if I extract it using 7Zip or WinRAR there are other jars, lets call it lib1.jar, lib2.jar.

Proguard设法混淆了主jar,但是当我向内看时,lib jar却没有.因此,该程序(masterProgram.jar)在某个点中断.我也已经在condig中设置了overloadaggressively选项.

Proguard managed to obfuscated the master jar, but when I look-inside the lib jars are not. and because of this the program (masterProgram.jar) breaks at a certain point. I also already set overloadaggressively option in my condig.

我通过ant build.xml调用proguard.jar. 这是我的配置文件config.proguard

I'm calling the proguard.jar through an ant build.xml. and here is my config file config.proguard

-injars 'masterProgram.jar'

-target 1.7
-dontshrink

-dontoptimize
-allowaccessmodification
-printmapping dataprintmap.txt
-overloadaggressively
-useuniqueclassmembernames
-repackageclasses ''
-keepattributes Exceptions,Innerclasses,Signature,Deprecated,*Annotation*,Synthetic
-renamesourcefileattribute SourceFile
-dontnote
-printseeds dataseed.txt
-dontskipnonpubliclibraryclasses

推荐答案

罐子里的瓶子并不是罐子应该如何工作的.您需要重新整理内容,以使ProGuard能够处理这些内容. ProGuard无法处理罐子中的罐子,因为这不是罐子的预期用途.

Jars inside jars are not really how jars are supposed to work. You'll need to rearrange things to make ProGuard able to deal with things. ProGuard has no way to deal with jars in jars because that's not how jars are intended to be used.

这篇关于如何使Proguard对jar文件中的jar进行混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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