Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUI problems with obfuscated byte code on jdk 1.4



np wrote:

>I am having trouble with running an application that uses obfuscated jars
>on jre 1.4 (OS X 10.4.5, PPC G4). While the app runs with no problem on
>CoreDuo MiniMacs (10.4.8, jre.1.5.06), parts of the GUI will not properly
>draw on the older System.
>...
>Everything works fine with non-obfuscated byte code. I tried various ways
>of keeping methods and classes related to the GUI non-obfuscated, but it
>does not seem to help.

Before you obfuscate, what amount of symbol information is compiled into
your class files?  Full debugging symbols, line-numbers, or less?  In other
words, what compiler options are you compiling with?

What compiler are you compiling with?  For what target?


Which obfuscator are you using?  If it's not ProGuard, have you tried
ProGuard to see if it makes a difference?

To what extent does your obfuscator strip or obfuscate?  If you just remove
debugging symbols and line-numbers, but no external names, will the app
work?

Is your obfuscator working with the correct boot-classpath classes for the
appropriate target JRE?  There might be some subtle difference between 1.5
and 1.4 that only appears when stripping things out (i.e. as done by an
obfuscator), and only manifests itself under 1.4, assuming 1.5 is the
boot-classpath during obfuscation.


Have you tried the obfuscated jar under JRE 1.4 on the Mac Mini?

Have you tried the obfuscated jar under JRE 1.5 on the G4 (update OS, too)?


Considering the wide differences between your two base platforms, and
knowing nothing about what's been stripped during obfuscation, there's no
way to tell where the problem might be.  It could be almost anything.

I've obfuscated several apps in the past, including some that did
Class.forName(), and never seen any problems at all.  My obfuscator was
ProGuard, and I've run it with varying degrees of obfuscation and name
stripping.  It's pretty easy to change the config once you have it set up,
and you can tell it to do no code motion at all, while still mangling
names.  If anything is suspect, it's probably code motion or code removal.
Name-mangling failures tend to fail when classes load, not when they run.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.