Proguardを使用して自分のGWT(Vaadin)アプリケーションを難読化しようとしています。私は前にJavaコードを難読化したことはありません。これはProguardを使った私の最初の試みです。ProGuardを使用したGWT Webアプリケーションの難読化
私は次のように設定され、私のconfigファイルを持っている:
-libraryjars JAVA_HOME\rt.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\appfoundation.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\blackboard-2.1.1.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\cssinject-0.9.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\eclipselink.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\eclipselink-jpa-modelgen_2.0.2.v20100323-r6872.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\gwt-visualization.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\iText-5.0.4.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\javax.persistence_1.0.0.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\javax.persistence_2.0.0.v201002051058.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\vaadin-6.4.4.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\vaadin-calendar-0.5.1.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\vaadin-chameleon-theme-1.0.1.jar
-libraryjars MYPATH\test\WebContent\WEB-INF\lib\VisualizationsForVaadin.jar
-libraryjars "C:\Program Files\eclipse\configuration\com.vaadin.integration.eclipse\download\gwt-dev\2.0.3\gwt-dev.jar"
-libraryjars "C:\Program Files\eclipse\configuration\com.vaadin.integration.eclipse\download\gwt-user\2.0.3\gwt-user.jar"
-injars test.war
-outjar test_after.war
-printseeds
-ignorewarnings
-keep public class TestApplication extends com.vaadin.Application {
public void init();
}
を私は、ProGuardのコマンドを使用して実行します。
java -jar proguard.jar @test.pro
私は設定ファイルですべてのエラーを取得いけないが、私はたくさんのを受けません警告。出力ファイルは作成されますが、警告は心配です。私は設定ファイルにさらにjarファイルを指定する必要がありますか?私は自分のアプリケーションで使用しているすべてのジャーをリストアップしました。私は間違っている何か他にありますか?
以下コマンドライン出力の最後の20〜行予め
おかげ
S.
Maybe this is library method 'sun.jdbc.odbc.JdbcOdbcStatement { java.sql.Connection getConnection(); }'
Maybe this is library method 'sun.jdbc.odbc.ee.CommonDataSource { java.sql.Connection getConnection(); }'
Maybe this is library method 'sun.jdbc.odbc.ee.ConnectionPoolDataSource {java.sql.Connection getConnection(); }'
Maybe this is library method 'sun.jdbc.odbc.ee.DataSource { java.sql.Connection getConnection(); }'
Maybe this is library method 'sun.jdbc.odbc.ee.PooledConnection { java.sql.Connection getConnection(); }'
Maybe this is library method 'sun.rmi.transport.StreamRemoteCall { sun.rmi.transport.Connection getConnection(); }'
Note: org.eclipse.persistence.sdo.helper.DynamicClassWriter accesses a declared method 'writeReplace()' dynamically
Maybe this is program method 'org.eclipse.persistence.sdo.SDODataObject {java.lang.Object writeReplace(); }'
Maybe this is program method 'org.eclipse.persistence.sdo.helper.ListWrapper { java.lang.Object writeReplace(); }'
Maybe this is library method 'com.sun.corba.se.impl.presentation.rmi.InvocationHandlerFactoryImpl$CustomCompositeInvocationHandlerImpl {
Note: there were 4 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
Note: there were 10 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
Warning: there were 3649 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Warning: there were 173 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
ブラウザに送信されるアプリケーションの部分はもうJavaではありません。これは普通の古いjavascriptです(これはGWTのコアアイデアです)。 GWTの設定にもよりますが、GWTの主要な目標は縮小ですが、すでに非常に難読化されています。あなたのサーバにアクセスしてクラスファイルを読んでいる人がいらっしゃるのを心配していない限り、Javaの部分を難読化するのはほとんどありません。 – tdammers
私は自分のサーバー上でコードをホストすることはありません。それはクライアントに与えられます。 Id氏はコードを難読化することを好む。出力ファイルに自分のコードが含まれていません。それはすべてのライブラリのjarファイルを持っていますが、私の実際のコードは出力ファイルにありません。それは私のコードのjarファイルを作成しましたが、そこにはcssファイルしかありません - javaコードはありません:( – Santiago
私のJavaコードがproguardの出力ファイルに含まれていない理由についてのアイディア? – Santiago