2016-08-07 16 views
0

私はJavaコードを難読化しており、Proguard 5.2.1を使用しています。しかし、GUIを使用しながら、思いついた警告があります:設定ファイルを持たないProguard GUIによる難読化

ProGuard, version 5.2.1 
Reading program jar [/root/Desktop/ACGPlain.jar] 
Reading library jar [/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar] 
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey 
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey 
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey 
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey 
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey 
Warning: there were 5 unresolved references to classes or interfaces. 
     You may need to add missing library jars or update their versions. 
     If your code works fine without the missing classes, you can suppress 
     the warnings with '-dontwarn' options. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) 
Please correct the above warnings first. 

私は-dontwarnオプションを持つコマンドライン上でそれを実行しようとしたと難読化は動作しませんでした。私が試してみました、あまりにも次

java -jar proguard.jar -injar /root/Desktop/ACGPlain.jar -outjar /root/Desktop/ACGOB.jar -keepclass javax.crypto.SecretKey 

javax.crypto.SecretKeyクラスを隠してからProGuardのを停止する方法はありますか?私はGUIソリューションを探していますが、設定ファイルではありません。私のJavaコードはAndroid用ではなく、サーバーとクライアント間の転送を保護するプログラムです。

答えて

1

暗号関連のクラスは、別のjarファイルにあります。あなたの設定ファイルに別の-libraryjar設定を追加する必要があります。

-libraryjar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar 

別のオプションは、それはあなたのケースでは無害であるとして、エラーを無視するようになります:

-ignorewarnings 

または

-dontwarn javax.crypto.** 
関連する問題