What to do with Class.forName(), Class.getName() when Obfuscating

hi,
I have been asked at my company to perform Obfuscation of our project-code, The problem I have been facing is,
We have got too many Class.forName(), Class.getName() calls in our Project-code, which is really hindering the process of Obfuscating all the Classes (refrences in code may break for all these classes which are dynamically being asked for, hence the project may suffer). And it is a pain-in-neck to really resolve which classes to exclude so that code should not break after obfuscation.
What my question is:
Do we have some automated tool to take care of all these Reflection API calls, so that work left to us is minimal?
If not, Do we have some short-cut (program, tool etc.) to identify all the classes which should be excluded?

Which program are you using when obfuscating?
In RetroGuard you can for example avoid certain class names, or packages, to be obfuscated.

Similar Messages

  • What to do with your original table query when partitions are added?

    Relating to SSAS Tabular in VS2013:
    This is something that has always bugged me and I haven't found any documentation on it...
    Say for example I create one query for the last 5 years worth of data.  Before deployment, I partition it into 5 sections - one for each year.
    Now when I click on Table Properties, it still shows the original query for 5 years.  What can I do with this screen?  Is there any functional benefit?  It seems rather pointless...  I usually clean it up with something similar
    to the below simply for the sake of cleanliness:
    Select col1 as NULL, col2 as NULL, col3 as NULL etc... 
    Any advice is welcome!
    Thanks,
    Simon

    Sorry not clear on which screen you're talking about
    Can you post a screenshot?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • What's up with my screen?!

    what's up with my screen?! when i go outside i see trees and the sky. how do i fix that?

    Hi,
    You're best solution is to try to sit in a shaded location. To outdoor sun is many times more powerful than the backlight in the MacBook. The MacBook LCD screen is a transmission mode screen. You can't see the LCD's image until light is transmitted throgh the display from behind. If you are standing in bright light, the display will look dark, barely readable.
    There are also retro-reflective LCD displays that actually look better the brighter the incident light gets. The mechanism they use has different amount of twist in the LCD material. The incident light is phase shifted ny the LCD, reflected behind the panel, the phase shifted again by the display as the light wave returns in the direction of the viewer. The internal polarizer filter is set differently to accomodate the fact light passes through the LCD twice: in and back out. Unfortunately, this type of display is not available for MacBook.
    There are also hybrid transmission/retro-reflective, but there is a compromise in contrast range available.
    There is one thing you can try. There are neutral density filters you can try. The mechanism is: Transmitted desirable light is attenuated 50%. Incident unwanted light is attenuated 50% going toward the display, then 50% of the remaining incident light is further attenuated as it reflects back to the viewer. This gives an apparent improvement in contrast with deeper dark colors, but the over-all display is dimmer. The results might not be satisfactory in very strong light outdoors.
    --Bill

  • Can't load class with Class.forName()

    Hi, can somebody help me with this problem. I have clas copiled with jdk 1.3.1 (I also test it with jdk 1.4.1). If I try to load a Class instance with Class.forName("package.app.MyClass)") I have a runtime exception:
    java.lang.ClassNotFoundException: com.unisys.ebs.all.ispecs.GD130IspecModel
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:115)
         at com.unisys.util.ObjectLoader.load(ObjectLoader.java:60)
         at com.unisys.jellybeans.IspecFactory.getIspec(IspecFactory.java:74)
         at com.unisys.jellybeans.LINCEnvironment.getIspec(LINCEnvironment.java:1012)
         at com.unisys.ebs.middleware.TestLinc.initConnection(TestLinc.java:52)
         at com.unisys.ebs.middleware.TestLinc.main(TestLinc.java:106)
    but if instead of this I instantiate the class calling the constructor and writing an import sentence, it works fine. I really need to instantiate this class via Class.forName because it extends a superclass and know the class to instantiate only at runtime. I will appreciate any help. Thanks.
    Pablo Antonioletti

    I removed the import in the file header and wrote this code:
    try{           
    ispecModel = new com.unisys.ebs.all.ispecs.GD130IspecModel();
    Class ispecClass = Class.forName("com.unisys.ebs.all.ispecs.GD130IspecModel.class");
    catch(Exception e)
    e.printStackTrace();
    the new sentence work fine, if write mor code I can access methods and members. When the runtime execute the Class.forName sentence the exception is thrown. I put all in the same file and class to avoid mistakes typing class path.
    This is very rare I never seen it before and I developed java application since five years ago.

  • What happens as we use strictfp modifier with class and interface ?

    I just knew that strictfp can't be used with variables?
    I want to know that why we use strictfp with class and interface?

    makpandian wrote:
    i hope i can understand if you explain myself.Okay, let me go ahead and try to explain yourself.
    The concept of a makpandian can be summed up as the following: a simple-minded, java forum-goer who posts questions directly from his SCJP 6 study guide in hopes that forum members will give him a simple answer that he can correlate to a multiple-choice response. By doing this, the makpandian suspects that passing the SCJP 6 exam will become a tangible reality, thus enabling it to obtain a job in the public work sector (given the great significance of this type of certification in the makpandian's presumed country of origin (India, for those of you who aren't following along)).
    So how'd I do? Did I do a good job of explaining yourself?

  • Need help in doing exercise with classes

    Here is my exercise:
    1.     An object Student has: id, last name, first name, number of AAS courses and number of ESL courses in current semester and whether student uses laptop or not.
    The formular to calculate tuition fee:
    Tuition fee = AAS courses *20 ESL courses * +15+
    +If student uses laptop, tuition fee will be deducted 5%
    Write the methods to:
    o     Calculate tuition fee.
    o     Display student information
    My Student class:
    public class Student {
         private String id;
         private String lastName;
         private String firstName;
         private double nAAS;
         private double nESL;
         public void setIdentification(String input) {
              id = input;
         public void setLastName(String input) {
              lastName = input;
         public void setFirstName(String input) {
              firstName = input;
         public String getID() {
              return id;
         public String getLastName() {
              return lastName;
         public String getFistName() {
              return firstName;
         public void setNumberOfAAS(String input) {
              nAAS = Double.parseDouble(input);
         public void setNumberOfESL(String input) {
              nESL = Double.parseDouble(input);
         public double getNumberOfAAS() {
              return nAAS;
         public double getNumberOfELS() {
              return nESL;
         public double result(String input) {
              if (input.equalsIgnoreCase("true")) {
                   return (getNumberOfAAS() * 20 + getNumberOfELS() * 15) * 0.95;
              } else {
                   return getNumberOfAAS() * 20 + getNumberOfELS() * 15;
    }And my DisplayResult class:
    import javax.swing.JOptionPane;
    public class DisplayResult {
         public static void main(String[] args) {
              String input;
              Student st = new Student();
              input = JOptionPane.showInputDialog("Enter the ID here:");
              st.setIdentification(input);
              input = JOptionPane.showInputDialog("Enter the last name:");
              st.setLastName(input);
              input = JOptionPane.showInputDialog("Enter the first name:");
              st.setFirstName(input);
              input = JOptionPane
                        .showInputDialog("Enter number of AAS courses you took:");
              st.setNumberOfAAS(input);
              input = JOptionPane
                        .showInputDialog("Enter number of ESL courses you took:");
              st.setNumberOfESL(input);
              input = JOptionPane
                        .showInputDialog("Enter \"true\" for using laptop and \"false\" if not:");
              st.result(input);
              // Display the result
              JOptionPane.showMessageDialog(null, "The result is:\n" + st.getID()
                        + " " + st.getLastName() + " " + st.getFistName()
                        + "\nYou have: " + st.getNumberOfAAS() + " AAS "
                        + st.getNumberOfELS() + " ESL\n" + "Using laptop: " + input
                        + "\nYour tuitionFee is: "
                        + st.result());
    System.exit(0);
    }The eclipse notice an error which is st.result in DisplayResult class. Please tell my what 's wrong with it?
    Edited by: congtm88 on May 4, 2009 9:43 AM

    Oh thax. I corrected it.
         public static void main(String[] args) {
              String input;
              Student st = new Student();
              input = JOptionPane.showInputDialog("Enter the ID here:");
              st.setIdentification(input);
              input = JOptionPane.showInputDialog("Enter the last name:");
              st.setLastName(input);
              input = JOptionPane.showInputDialog("Enter the first name:");
              st.setFirstName(input);
              input = JOptionPane
                        .showInputDialog("Enter number of AAS courses you took:");
              st.setNumberOfAAS(input);
              input = JOptionPane
                        .showInputDialog("Enter number of ESL courses you took:");
              st.setNumberOfESL(input);
              input = JOptionPane
                        .showInputDialog("Enter \"true\" for using laptop and \"false\" if not:");
              // Display the result
              JOptionPane.showMessageDialog(null, "The result is:\n" + st.getID()
                        + " " + st.getLastName() + " " + st.getFistName()
                        + "\nYou have: " + st.getNumberOfAAS() + " AAS "
                        + st.getNumberOfELS() + " ESL\n" + "Using laptop: " + input
                        + "\nYour tuitionFee is: "
                        + st.result(input));
    System.exit(0);
         }But I think that, I should change result method into useOfLaptop then write one more instance method name getResult in Student class, right?

  • What is an executable class

    What is an executable class in java. Can someone explain with an example??

    I'd guess a class with a public static void main( String[] ) method.
    i.e.
    public class Test {
        public static void main( String argv[] ) {
              System.out.println( "BOO!" );
    }javac Test.java
    it can the be executed with the java command:
    java Test
    Resources for Beginners
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.

  • Working with Classes and Arrays

    hello to all,
    public class Store
    //private data
    private Person list[];
    private int count;
    private int maxSize;
    //constructor starts
    public Store(int max)
    count = Person.count(); //sets count to 0     
    maxSize = max;//maxSize is equals to max
    Person list[] = new Person[maxSize];
    }//end of store
    //constructor ends
    //accessor starts   
    public int getCount()
    for(int i=0; i<list.length; i++)
    int result = list;
    return result;
    }//returns the number of elements currently in store
    the code above is working with classes and some arrays
    what am trying to do is to display what the array holds
    and then i meet an error saying that
    INCOPATIBLE TYPES - FOUND PERSON BUT EXPECTED INT
    Please note that am new to this!
    Thank you in advanced!
    <img src="file:///C:/Documents%20and%20Settings/fh84/Desktop/untitled.JPG" alt="" />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    public class Store
        //private data
        private Person list[];
        private int count;
        private int maxSize;
    //constructor starts
        public Store(int max)
             count = Person.count(); //sets count to 0     
             maxSize = max;//maxSize is equals to max
            // Person list[] = new Person[maxSize];
             Person list[] = new Person[maxSize]; //set tne
        }//end of store
    //constructor ends
    //accessor starts  
        public int getCount()
            for(int i=0; i<list.length; i++)
                int  result = list;
    return result;
    am sending the code again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • What  is a mapper class ?

    what is a mapper class?
    it looks like it maps to something ...right ?
    can you provide some example ? this concept is not clear.
    N.B :
    I am giving you some context where i have come accross this term ....i have noticed this , where there are some messaging (JMS,MQ etc ) involved in applications........if the application have messaging , then the project usually contain some mapper kind of class......yes, i know this is not a full information that i can give you...........the point is , have you seen this kind of mapper classes in your project ? what they do ? can you give some outline view what it does basically ......i am interested in this terminology.

    Thanks for the response.
    The "mapper" classes do you usually convert/map from
    one format to another by mapping values. you told "format".
    uhh....ok....suppose i have a XML message(complient to XSD1) which lies in JMS queue(suppose) ....does a Mapper class tears this XML message and then again build another XML Message (complient to XSD2) ......is it like this ? is it the job of a mapper class ? does it simply makes a new different format from a given format ?
    E.g. data
    from your model should be mapped into fields in a
    predefined message format.ahh....so, if i have a javabean(data model) with many properties then a mapper class takes these properties and puts these in the appropriate fields of a predefined message format.
    anything else involved here ?
    In fact , i was looking for mapper classes who are involved in messaging
    Kaj

  • What happens to abstract classes now?

    As we can write default implementations to the methods in a interface, what happens to abstract classes now?

    just because you can doesn't mean you should. And this is a clear case of you should not.
    Allowing implementation in interfaces is a dirty hack they needed to put in to be able to bolt on some of the other stuff without breaking forward compatibility with existing code.
    That doesn't make it a good idea, in fact it's a pretty good indication that the stuff they hacked in this way is itself not a good idea.

  • What is file extension .class?

    I am new to java and want to know what the file extension .class is and how do I open and edit a file with this extension?

    .class files are created by the compiler from .java file, which is your code... if you're new to java, you probably don't want to open and edit your .class files. If you want to make changes to your program, open the .java and recompile.

  • What's the WMI class name to get Client Approval status

    What's the WMI class name to get Client Approval status.
    Unfortunately the below example with class "SMS_R_System" does not have the approval status
    Get-WmiObject -Namespace "root\sms\site_LAB" -Class SMS_R_System | fl *
    I listed all the available classes and... yeah It's going to take along time to go though all the possibilities.
    Note: I'm running this in powershell on the primary first
    If anyone knows it... I'd appreciate your help

    This is all still in the testing phase so I'm not sure this is the best solution... but here's my problem and idea to resolve it.
    Currently in our environment OSD can only be run against unknown computers and approved clients.
    I currently automatically approve all clients in a trusted domain. So all systems that succeed OSD and auto join the domain are approved and I can always run OSD against those machines in the future.
    Problem is with the systems that fail OSD for any reason and therefore do not automatically join the domain. They end up getting a SCCM record by the name of "Unknown" and therefore cannot run OSD again until the "Unknown" record
    is deleted. "Unknown" records happen too frequently to manually delete and I'm not too comfortable with just deleting ALL of them on a scheduled basis.
    Additionally there are way too many OU's in my environment to automatically join our OSD'd systems to the domain. So I have a script that checks using a prestart command to see if the system is already in AD, and if so then OSD continues and simply
    joins the machine to the domain in it's current OU. If not the tech is given a nasty error message telling them to add the computer object in AD in the proper OU first.
    I intend to check , with a Prestart Command if the current system already has a record in SCCM and delete it if found AND is not approved yet. This should resolve the "There are no task sequences available" error I get with
    systems that have an "Unknown" SCCM record.
    In this way the system will be essentially approved if the system was already prestaged in AD manually by a technician and any "unknown" record for that system will simply be deleted at the point of OSD.
    Note: Although I can easily use the new SCCM Powershell cmdlettts and get the "Approved" status, I need to do all of this in WinPE without the cmdletts. If this property is not available via WMI, then I'm guessing this will not work.

  • How to trigger New page while using ALV with classes/oops?

    Hi All
    I am trying to print a report which has to show the data in two pages.
    I am using ALV with classes/oops.
    Though I am able to print the report but a new page is not coming. Whole of the data is coming in one single page.
    Please tell me as to how to trigger a NEW PAGE while using ALV with classes/oops.
    Please send some code samples also if available.
    Thanks in advance.
    Jerry

    using sort option you can do it. in case of grid/oo alv class ALV you can view that only in print mode/preview mode.
    in case of list you can view that directly.
    sort-fieldname = 'FIELDNAME'.
    sort-group = '*'  "triggers new page
    sort-up = 'X'.
    append sort to it_sort.

  • Class.GetName or .InstanceOf(className) in ABAP

    Dear all,
    how do you realize the java methods/checks
    class.GetName or
    (Is)InstanceOf(className)
    of a current class instance in ABAP OO ?
    best regards,
    Christoph Aschauer

    Hi Christoph
    Will it be useful to use <b>RTTI (Run-Time Type Identification)</b>? That is, the class <b>"CL_ABAP_TYPEDESCR"</b> and its subclasses. One of its subclasses (<b>cl_abap_classdescr</b> as I remember) can be used to identify the type of an instantiated object.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Producer/Consumer Design Pattern with Classes

    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Jason

    JTerosky wrote:
    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Including the error cluster as part of the  private data is something I have never seen done and ... well I'll have to think about that one.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Can i transfer money across itunes accounts

    I want to transfer money across from one itunes account to another is this possible?

  • ORA-03212 temporary tablespace

    Hi all, we run a single instance database on file system (no ASM). The database has benn running fine for several weeks now. 2 days ago however the following error came up: "*** MODULE NAME:(DBMS_SCHEDULER) 2012-09-02 06:00:03.470 *** ACTION NAME:(MG

  • Where can I find SAND font?

    Hi, I just inhreited my sister's computer, running 10.4.1 like mine did, but for some reason, hers doesn't have Sand in the fonts. Right now I am hooked up to my old one by firewire and could copy the font to hers, but I can't find it on mine. It isn

  • Reg Stored Procedures

    Hi Guys, I have a requirement. My requirement is user has two prompts. Once he gives values to these prompts, these values must be passed as parameters to stored procedure. This stored procedure will populate a temporary table. The report have to get

  • Cannot login from Windows iCloud control panel, but that not all...

    I set up my Apple Id and downloaded the Windows iCloud control panel, but when I try to sign in from my PCI get this message: "You can't sign in because of a server error." But when I check the status of icloud everything is operational. But if I go