×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    10

    Inner classes and throwing exception in obfuscating 4

    Hi All



    I am doing a library with JME to be used in others applicaitions.

    My IDE is Netbeans 6.8.

    The users can either call the library methods directly or inherit from it's

    classes.

    For security reasons I made an obfuscating with level 4 for the library.

    I chose level 4 because it shows protected and public things and obfuscate

    the others data. This is suitable for my case.

    The problem is:
    1- The static inner classes can't be shown by application which uses the

    library .
    (Even it is public and it is outer class is public too)

    2- The methods which throw exception appears as it don't t throw any

    exception. When I am trying to override it in the application , it gives me

    an error "cannot override method_name in class_name; overridden method does

    not throw java.lang.Exception ".

    Finally I tried to turn of the obfuscating and everything went fine.

    Please give any help or info in this problem.

    Best Regards

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Inner classes and throwing exception in obfuscating 4

    Hmmm... I would recommend you don't obfuscate a library. If you're not going to distribute the library, then there is no point obfuscating it. If you are.. well, there still isn't much point.

    If you do obfuscate a library, configure the proguard parameters manually. You will need custom options to get a library how you want it. I'm guessing that proguard is removing unused classes and class references.

    Graham.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    10

    Re: Inner classes and throwing exception in obfuscating 4

    Thanks a lot.
    The following parameters solved my problem:

    -keepattributes Exceptions,InnerClasses

Similar Threads

  1. Throwing unhandled exception
    By venkat512 in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2006-08-24, 08:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×