java - Proguard obfuscated jar won't launch -


i having trouble running obfuscated jar, got "java virtual machine launcher" message "a java exception has occurred" when try run it. (this error popup, not on command line) tried running command line , printing stacktrace jvm console , didn't see exceptions.

so did little troubleshooting: disabled shrinking, obfuscating , optimizing output (should be) same input. output jar turned out few kb less input. extracted both jars, decompiled .class files , compared source of every single file , manifest.mf , same*!

i'm using proguard 4.10, jdk 1.7.0_25 x64 , windows 8. i'm building elaborate javafx program , believe configured proguard- shouldn't matter anymore if shrinking, obfuscating , optimizing disabled, right? here notes proguard gives me:

note: duplicate definition of library class [netscape.javascript.jsexception] note: duplicate definition of library class [netscape.javascript.jsobject] note: com.javafx.main.main accesses field 'hkey_local_machine' dynamically note: com.javafx.main.main accesses field 'hkey_local_machine' dynamically note: com.javafx.main.main accesses declared method 'reset()' dynamically note: com.javafx.main.main$2 accesses field 'error_message' dynamically 

when first tried obfuscating, skipped com.javafx.main.** still got messages. appreciated. had no problems running jar before processed proguard. thanks.

*edit: when doing binary comparison, manifest files differ (the original longer) doing ascii comparison both files identical. other files identical. difference between 2 manifest.mf files pc vs. unix line breaks.

*edit2: ran file -jar option, , did explicit exception!

java.lang.securityexception: invalid signature file digest manifest main attributes 

from com.javafx.main.main here use of error_message , hkey_local_machine:

int error_message = error_message_field.getint(null);  method showmessagedialogmethod = joptionpaneclass.getmethod("showmessagedialog", new class[] { componentclass, object.class, string.class, integer.type });  showmessagedialogmethod.invoke(null, new object[] { null, this.val$string, "javafx launcher error", new integer(error_message) }); 

...

field hkey_local_machine_field = winregistryclass.getfield("hkey_local_machine"); int hkey_local_machine = hkey_local_machine_field.getint(null); string path = (string)mget.invoke(null, new object[] { new integer(hkey_local_machine), "software\\oracle\\javafx\\" + version, "path" }); 

the jar signed; made unsigned version , obfuscated correctly!


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -