Proguard Applets and non-overriding methods

R

Richard Maher

Hi,

Sorry for the Proguard specific question (is there a Proguard forum?) but it
is JAVA related so I do hope someone can help.

Basically Progaurd is zapping (omitting, treating as surplus) all of my
Applet methods that aren't overriding init(),start(),stop(),destroy() etc.
I'm off to look at the help for the aggressiveness-throttle but does someone
here know how to tell Proguard to back-off in these cases?

I was really impresses when the new JAR file was two-thirds the size of the
original but if it takes out all the good bits then it's far less impressive
:)

Cheers Richard Maher

PS. My Applet also implements an Interface which Proguard honours.

PPS. These methods are there to be scripted by Javascript. I'm guessing
there must be a "keep" method just like the keep Applets one?
 
A

Arne Vajhøj

Sorry for the Proguard specific question (is there a Proguard forum?) but it
is JAVA related so I do hope someone can help.

Basically Progaurd is zapping (omitting, treating as surplus) all of my
Applet methods that aren't overriding init(),start(),stop(),destroy() etc.
I'm off to look at the help for the aggressiveness-throttle but does someone
here know how to tell Proguard to back-off in these cases?

I was really impresses when the new JAR file was two-thirds the size of the
original but if it takes out all the good bits then it's far less impressive
:)

Cheers Richard Maher

PS. My Applet also implements an Interface which Proguard honours.

PPS. These methods are there to be scripted by Javascript. I'm guessing
there must be a "keep" method just like the keep Applets one?

ProGuard by itself only looks at what seems to be used. It can not see
what some JS may call.

So you need to use the keep* switches.

http://proguard.sourceforge.net/manual/usage.html#keepoptions
http://proguard.sourceforge.net/manual/examples.html#library

Arne

PS: ProGuard questions here seems quite on topic to me.
 
R

Roedy Green

Basically Progaurd is zapping (omitting, treating as surplus) all of my
Applet methods that aren't overriding init(),start(),stop(),destroy() etc.
I'm off to look at the help for the aggressiveness-throttle but does someone
here know how to tell Proguard to back-off in these cases?

What happens when you RUN it. Maybe it inlined the code.
 
R

Richard Maher

Hi Roedy,

Roedy Green said:
What happens when you RUN it.

Not much :)

A JAD decompile tells me there's none my methods are there and my Javascript
"if (chan.isAuthorized())" is not happy at all.

At the moment I have stuck "<methods>; }" under my "-keep public class *
extends java.applet.Applet {" and everything looks good, but I'm gonna try a
finer level of granularity and actually list each entry-point/method I wish
to preserve and see what happens. I'm suspicious that too much is being left
unobfiscated.

Cheers Richard Maher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,187
Members
46,729
Latest member
ScarlettJe

Latest Threads

Top