Java Decompiler for Inner classes

Hi,
I am looking for a Java Decompiler that can handle the decompiling of inner classes fairly well. Any help will be appreciated. Thanks.

dj decomplier is probably the best one. u can look for it on google.

Similar Messages

  • I need java decompiler for multiple class

    Hello, i need a java decompiler for multiple class.
    avoiding of decompile one to one.
    Thanks

    Use JAD it has recursive decompiles.

  • Why do we go for inner classes in java?

    why cant we inherit the classes instead of having inner classes.
    what is the exact difference between the inner class and subclass.
    can anyone please explain me with some examples

    An inner class doesn't have any relationship with the outer class per se,
    except for one thing: an instantiation of the inner class can refer to the
    members of the instantiation of the outer class. One instantiation of the
    outer class can have many instantiations of the inner class 'circling
    around' it. Try to implement the following example using inheritance:public class Star {
         private String name;
         public Star(String name) { this.name= name; }
         public Planet addPlanet(String name) { return new Planet(name); }
         public class Planet {
              private String name;
              private Planet(String name) { this.name= name; }
              public Moon addMoon(String name) { return new Moon(name); }
              public class Moon {
                   private String name;
                   private Moon(String name) { this.name= name; }
                   public String toString() { return name+" (circling around "+Planet.this+")"; }
              public String toString() { return name+" (circling around "+Star.this+")"; }
         public String toString() { return name; }
         public static void main(String[] args) {
              System.out.println(new Star("sun").addPlanet("earth").addMoon("moon"));
    }kind regards,
    Jos

  • Class not Found Execption for inner classes

    Hi ,
    When I am trying to deploy a custom component despite of putting the class path I am facing isses regarding class not found for classes that are present in an inner jar.Can someone please let me know what could nbe wrong.Please let me know the correct way of doing so.
    I am adding a data type as well and adding the path thre also.
    Regards,
    Leena

    The most common problem is in the path part of the class-path.  One thing to remember is not to bother with .. or / at the start of the path.  For example my jar files are in a lib folder off the root of my application:
    <class-path>lib\aglj40.jar lib\pdfcore.jar lib\pdfencryption.jar lib\pdfservices.jar lib\rideau.jar</class-path>

  • Java inner classes

    G'day
    How does one - in CF - refer to an inner class (ClassFoo.Bar)
    of a given
    class (ClassFoo), when the constructor of ClassFoo takes an
    argument of
    type ClassFoo.Bar?
    For example the first, third,fourth and fifth constructors
    shown here:
    http://tinyurl.com/hfg9s
    (org.apache.lucene.document.Field).
    Any ideas?
    Adam

    >is the reason you can't use another "." because it is not
    a property of Field
    Thats my understanding, yes.
    > what does the $ represent
    Its part of the class name. It has to do with how java
    compiles the classes. It creates one file for the outer class and
    one for the inner class. The naming convention for inner class
    files is usually "OuterClassName$InnerClassName.class". So the
    class name passed to createObject() becomes
    bar = createObject("java", "OuterClassName$InnerClassName");

  • Java Docs for the Module Process Classes

    Hi,
    I would like to start creating my own JDBC and file-based modules for interface development. I have found several  SDN contributions which step through the creation of these modules. These are very helpful.
    However, I have not yet found comprehensive documentation describing the classes used in module develpment. i.e.:
    - com.sap.aii.af.mp.module.Module
    - com.sap.aii.af.mp.module.ModuleContext
    - com.sap.aii.af.mp.module.ModuleData
    Does anyone know where to find the Java Docs for these classes? Or is there any other equivalent explanation of how to use these classes, their methods and fields?
    Any help would be greatly appreciated.
    Carl Engel
    CSC Australia

    Hi Carl,
    Another link for you
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/frameset.htm
    This says that the java documentation is available in the example adapter/module that is there with XI.
    I vaguely remembering seeing the docu..it was long back though..right now i donot have access to a system...
    Get the rar(java archive) that i talked about in the above link...
    Thanks,
    Renjith

  • Null pointer exception with inner class

    Hi everyone,
    I've written an applet that is an animation of a wheel turning. The animation is drawn on a customised JPanel which is an inner class called animateArea. The main class is called Rotary. It runs fine when I run it from JBuilder in the Applet Viewer. However when I try to open the html in internet explorer it gives me null pointer exceptions like the following:
    java.lang.NullPointerException      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2761)      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2722)      
    at Rotary$animateArea.paintComponent(Rotary.java:251)      
    at javax.swing.JComponent.paint(JComponent.java:808)      
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)      
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)      
    at javax.swing.JComponent._paintImmediately(JComponent.java:4668)      
    at javax.swing.JComponent.paintImmediately(JComponent.java:4477)      
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)      
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)      
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)      
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)      
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)      
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)      
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Do inner classes have to be compiled seperately or anything?
    Thanks a million for you time,
    CurtinR

    I think that I am using the Java plugin ( Its a computer in college so I'm not certain but I just tried running an applet from the Swing tutorial and it worked)
    Its an image of a rotating wheel and in each sector of the wheel is the name of a person - when you click on the sector it goes red and the email window should come up (that doesn't work yet though). The stop and play buttons stop or start the animation. It is started by default.
    This is the code for the applet:
    import java.applet.*;
    import javax.swing.JApplet;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.util.StringTokenizer;
    import java.net.*;
    public class Rotary extends JApplet implements ActionListener, MouseListener
    public boolean rotating;
    private Timer timer;
    private int delay = 1000;
    private AffineTransform transform;
    private JTextArea txtTest; //temp
    private Container c;
    private animateArea wheelPanel;
    private JButton btPlay, btStop;
    private BoxLayout layout;
    private JPanel btPanel;
    public Image wheel;
    public int currentSector;
    public String members[];
    public int [][]coordsX, coordsY; //stores sector no. and x or y coordinates for that point
    final int TOTAL_SECTORS= 48;
    //creates polygon array - each polygon represents a sector on wheel
    public Polygon polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
    polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
    polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
    polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
    polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48;
    public Polygon polySectors[]={polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
                      polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
                      polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
                      polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
                      polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48};
    public void init()
    members = new String[TOTAL_SECTORS];
    coordsX= new int[TOTAL_SECTORS][4];
    coordsY= new int[TOTAL_SECTORS][4];
    currentSector = -1;
    rotating = true;
    transform = new AffineTransform();
    //***********************************Create GUI**************************
    wheelPanel = new animateArea(); //create a canvas where the animation will be displayed
    wheelPanel.setSize(600,580);
    wheelPanel.setBackground(Color.yellow);
    btPanel = new JPanel(); //create a panel for the buttons
    btPanel.setLayout(new BoxLayout(btPanel,BoxLayout.Y_AXIS));
    btPanel.setBackground(Color.blue);
    btPanel.setMaximumSize(new Dimension(30,580));
    btPanel.setMinimumSize(new Dimension(30,580));
    btPlay = new JButton("Play");
    btStop = new JButton("Stop");
    //txtTest = new JTextArea(5,5); //temp
    btPanel.add(btPlay);
    btPanel.add(btStop);
    // btPanel.add(txtTest); //temp
    c = getContentPane();
    layout = new BoxLayout(c,layout.X_AXIS);
    c.setLayout(layout);
    c.add(wheelPanel); //add panel and animate canvas to the applet
    c.add(btPanel);
    wheel = getImage(getDocumentBase(),"rotary2.gif");
    getParameters();
    for(int k = 0; k <TOTAL_SECTORS; k++)
    polySectors[k] = new Polygon();
    for(int n= 0; n<4; n++)
    polySectors[k].addPoint(coordsX[k][n],coordsY[k][n]);
    btPlay.addActionListener(this);
    btStop.addActionListener(this);
    wheelPanel.addMouseListener(this);
    startAnimation();
    public void mouseClicked(MouseEvent e)
    if (rotating == false) //user can only hightlight a sector when wheel is not rotating
    for(int h= 0; h<TOTAL_SECTORS; h++)
    if(polySectors[h].contains(e.getX(),e.getY()))
    currentSector = h;
    wheelPanel.repaint();
    email();
    public void mouseExited(MouseEvent e){}
    public void mouseEntered(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}
    public void mousePressed(MouseEvent e){}
    public void email()
    try
    URL rotaryMail = new URL("mailto:[email protected]");
    getAppletContext().showDocument(rotaryMail);
    catch(MalformedURLException mue)
    System.out.println("bad url!");
    public void getParameters()
    StringTokenizer stSector;
    String parCoords;
    for(int i = 0; i <TOTAL_SECTORS; i++)
    {               //put member names in applet parameter list into an array
    members[i] = getParameter("member"+i);
    //separate coordinate string and store coordinates in 2 arrays
    parCoords=getParameter("sector"+i);
    stSector = new StringTokenizer(parCoords, ",");
    for(int j = 0; j<4; j++)
    coordsX[i][j] = Integer.parseInt(stSector.nextToken());
    coordsY[i][j] = Integer.parseInt(stSector.nextToken());
    public void actionPerformed(ActionEvent e)
    wheelPanel.repaint(); //repaint when timer event occurs
    if (e.getActionCommand()=="Stop")
    stopAnimation();
    else if(e.getActionCommand()=="Play")
    startAnimation();
    public void startAnimation()
    if(timer == null)
    timer = new Timer(delay,this);
    timer.start();
    else if(!timer.isRunning())
    timer.restart();
    Thanks so much for your help!

  • Preverify and inner classes

    Hi. I'm trying to use a makefile to reduce build time for my project. The way it works:
    1. compile all the altered .java files
    2. preverify all of the replaced/new .class files from step 1 -- each individual file by file.
    However, I've run into a serious stumbling block. Some of my .java files contain inner classes. Step 2 works perfectly on all of the main .class files. But it simply skips the inner class .class files. I tried it manually and it had the same effect.
    Here is the command line (altered for confidentiality, but effectively the same).
    preverify -classpath "h:\\j2mewtk\\lib\\midpapi.zip;blahtmp" -d blahclasses foo.bar.baz.Foodle$FoodleFun
    This does not produce the desired output in blahclasses--it produces nothing! I'd really appreciate it if someone could tell me what to do. Is it ignoring everything after the $ sign?
    --Impulse.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK, well, I solved it myself. Turns out that I needed to get my makefile to replace every '$' with '\$', and then it worked perfectly.
    So I'm giving all my Duke Dollars to myself grin
    --Impulse.                                                                                                                                                                                                                                                                                                                                                                                                               

  • Your Opinions: Inner Classes Need static Members

    Hi All,
    I want to solicit opinions for a minor change to the way inner classes work. I submitted this as an RFE to Sun and they rejected it, really without giving a reason. I'd like to know your opinions. If there is strong support I will repost the RFE.
    As you probably know, inner classes cannot have static members. The following generates a compiler error:import java.util.*;
    public class MyClass {
       class MyInnerClass {
          // Next line causes compiler error...
          static Map m = new HashMap();
    }In order to get around this you have to make the Map variable a static member of the containing class:import java.util.*;
    public class MyClass {
       static Map m = new HashMap(); // so much for encapsulation...
       class MyInnerClass {
    }I am suggesting that inner class be allowed to contain static members. Here's my reasoning...please comment:
    There are times when members (i.e., fields and methods) rightfully belong to the class as a whole, not to any particular instance of a class. I'm sure we've all found times when it was necessary to have static members in our classes. The same issues that necessitated using static members in top-level classes make them desirable for inner classes as well.
    Designing a class as an inner class is a step toward encapsulation. By forcing static members that logically belong in an inner class to be declared in the containing class is to crack the encapsulation, IMHO.
    Even though a containing class has access to all of an inner class' members (including private members) and vice versa, I think the notion of inner static members still is more OO-ish.
    What are your opinions? Would allowing inner classes to contain static members make Java more object oriented? I think it would.
    Technically, I don't think there's any reason this cannot work since the JVM has no notion of inner classes, per se.
    What do you think?

    an inner class is effectively a non static instance
    variable of its enclosing class. Instance member, but not a variable. it's a class, a type, not a variable.
    >
    I think the problem here is that making a field static
    means more than just that that field and its value are
    common to every instance of the class. It means that
    the value is valid without an instantiation of that
    class.
    Since the class itself must be instantiated (it is
    not static), What do you mean, excatly, by "_must_ be instantiated"? You are not ever "required" to instantiate anything unless you want to use it.
    you can't have static member data inside it. I don't see how this follows from the previous part of the statement.
    How would you reference the static member data of
    the inner class? You would have to specify an
    instance of the inner class, and since this breaks
    the meaning of static, you can't have static members
    in an inner class.How about outerObj.InnerClass.staticMember The syntax is well defined. The question at hand is, do we really want to allow this? The syntax to do this should only be an issue after that question has been answered in the affirmative. The people at Sun have decided not to allow it, so for now, syntax is a non-issue.
    >
    if you wanted a static member in an inner class you
    could put it in a super class of the inner class...Or in the enclosing class, as suggested in the orginal post.

  • Who can explain inner class to me?

    //InheritInner.java
    //Inheriting an inner class
    class WithInner
         class Inner{
              Inner()
              {System.out.println("Inner class");
         WithInner()
         {System.out.println("WithInner");}
    public class InheritInner extends WithInner.Inner
         //!InheritInner(){}//Won't compile
         InheritInner(WithInner wi)
              wi.super();
         public static void main(String[] args)
              WithInner wi=new WithInner();
              InheritInner ii=new InheritInner(wi);
    Who can explain this subclass constructor to me?
    I appreciate your help!

    Here's the class that in 'Thinking in Java'. For some reason, yours is completely different.
    //: InheritInner.java
    // Inheriting an inner class
    class WithInner {
      class Inner {}
    public class InheritInner
        extends WithInner.Inner {
      //! InheritInner() {} // Won't compile
      InheritInner(WithInner wi) {
        wi.super();
      public static void main(String[] args) {
        WithInner wi = new WithInner();
        InheritInner ii = new InheritInner(wi);

  • Java Decompiler Code

    Hi,
    im a fresher in java
    im trying to develop my own java decompiler which translates class file to java file ,can anyone help me please how to start and give some guidelines .. wud b really helpful
    looking forward for your support .. thanks !!

    A decompiler is a very advanced project to take on, not for a "fresher".
    1. You must write a disassembler first.
    This involves being able to parse the binary class file, and convert it into java
    byte code instructions.
    As mentioned, the class file format is documented here, and is the sole reference I needed to write a disassembler.
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
    2. After you have the disassembled instructions, you can then try to reassemble
    them into higher level java source code.
    This isn't a trivial project.
    In my free time, I spent ( on and off ), 1 year writing my own disassembler to support Java 1.5, and I haven't even attempted a decompiler ( yet ).
    It has 279 classes, most fairly complex.
    Just to give you an idea of my experience, 7 years java, 5 years C++ and assembly. And you'll need some experience/concepts of assembly language to work out the stack frame to break the java byte code instructions into java statements.
    In my opinion, you're better off experimenting with the BCEL ( byte code engineering lab ), to extract details about the class file.
    regards,
    Owen

  • Inheriting from inner classes

    TIJ has a section on inheriting from inner classes, but the author didn't illustrate a scenario. What could be the possible usage? Why would one want to only inherit the inner case, but have to initialize the outter class (which it doesn't want to inherit)?
    Example code in the book:
        //: c08:InheritInner.java
        // Inheriting an inner class.
        class WithInner {
          class Inner {}
        public class InheritInner extends WithInner.Inner {
          //! InheritInner() {} // Won't compile
          InheritInner(WithInner wi) {
            wi.super();
          public static void main(String[] args) {
            WithInner wi = new WithInner();
            InheritInner ii = new InheritInner(wi);
        } ///:~

    I've certainly never felt the need to extend inner
    classes. As far as I'm concerned, inner classes are
    great for certain uses, all of which involve them
    being private. I've yet to find a scenario where a
    non-private inner class is preferable to a 'proper'
    class.To make the outer class act as a factory. The inner class is public but the constructors are private.

  • Are inner classes used the same way as derived classes?

    Hi,
    I got myself a bit confused when I came across inner and derived classes.
    However, I know that the syntax for both are different.
    For inner classes:
    class OuterClass {
    class NestedClass {
    For inheritance:
    class ClassA {
    class ClassB extends ClassA {
    But I justed wanted to clarify if there's differences in the usage of either one?
    Thanks.

    Nat7 wrote:
    Hi,
    I got myself a bit confused when I came across inner and derived classes.
    However, I know that the syntax for both are different.That should be a clue. They are entirely different things.
    What this question suggests to me is that you don't understand what a derived class is or you don't understand what an inner class is.
    Perhaps if you gave us your definitions of them we could fix this.

  • Why have inner classes

    Well I can understand the purpose of inner classes in multithreaded applications or where you need a continous monitoring, but I have always been wondering why use an inner application in a normal application. Any ideas?

    I guess you mean "inner class in a normal applications" in the last line of your question? If not, don't mention reading this reply since it doesn't answer your question in the latter case.
    Otherwise, the most common use for inner classes according to me is event handling and out of pure lazyness. Good programmers should be lazy you know.
    Let me give an example:
    public class Test() extends Applet{
    <some code here>
    private class Handler extends MouseAdapter(){
    public void mouseEntered(MouseEvent evt){
    <some event handling>
    In the example above we have an applet in which we want to do some MouseEvent handling.
    You could implement the mouselistener in your applet or you could create an inner class that extends MouseAdapter.
    When you implement the MouseListener interface, you have to define all methods from this interface in your applet to prevent it from being abstract.
    When you use an innerclass you only have to provide the method which you want to override, all the other are already implemented by extends the adapter.
    Another advantage of innerclasses is that you have access to all classvariables of the class in which you defined your inner class.
    I hope this can be a little help for you.

  • How to access private method of an inner class using reflection.

    Can somebody tell me that how can i access private method of an inner class using reflection.
    There is a scenario like
    class A
    class B
    private fun() {
    now i want to use method fun() of an inner class inside third class i.e "class c".
    Can i use reflection in someway to access this private method fun() in class c.

    I suppose for unit tests, there could be cases when you need to access private methods that you don't want your real code to access.
    Reflection with inner classes can be tricky. I tried getting the constructor, but it kept failing until I saw that even though the default constructor is a no-arg, for inner classes that aren't static, apparently the constructor for the inner class itself takes an instance of the outer class as a param.
    So here's what it looks like:
            //list of inner classes, if any
            Class[] classlist = A.class.getDeclaredClasses();
            A outer = new A();
            try {
                for (int i =0; i < classlist.length; i++){
                    if (! classlist.getSimpleName().equals("B")){
    //skip other classes
    continue;
    //this is what I mention above.
    Constructor constr = classlist[i].getDeclaredConstructor(A.class);
    constr.setAccessible(true);
    Object inner = constr.newInstance(outer);
    Method meth = classlist[i].getDeclaredMethod("testMethod");
    meth.setAccessible(true);
    //the actual method call
    meth.invoke(inner);
    } catch (Exception e) {
    throw new RuntimeException(e);
    Good luck, and if you find yourself relying on this too much, it might mean a code redesign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • IPhoto Importing Advice Requested

    Hello All, I hope someone could perhaps help me with an iPhoto issue. I am helping my friend switch from PC to Mac. Yes, a victory within itself! He has a rather large photo collection on his PC, and he has everything in precise Folders as far as Nam

  • S300M-S2142 -- 32-bit or 64-bit?? Switching from one to the other?

    Hi all: I recently purchased the Satellite Pro S300M-S2142 (and I think a lot of other people did, too!). When I first booted up I installed the 32-bit OS (Vista Business), but now I'm wondering if I should have gone with 64-bit and whether I will be

  • How to insert the data using  SyncoBo Object

    Hi ,     please provide the code for inserting the data such tat my meRepMeta.xml contains               one Top Row               4 Child Row i done the coding for inserting top row

  • I can not get an index file to load!

    on my website i have a html and php index file. i can get the index.html test fole to come up but when i type in www.mladysfavoredthings.com/index.php all i get is a blank screen. any suggestions, i have been working on this for 3 days now

  • Out.flush

    We have a servlet whose service method is along these lines           PrintWriter out = response.getWriter();           [or ServletOutputStream out = response.getOutputStream();]           out.println(someStuff);           out.flush();           [lot