Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Error while compile

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Error while compile

    Hello All

    i have a Jar file , i extract it and got the class files

    so i tried to edit one of these class files , using " DJ Java Decompiler " and " Javac command "

    but i get an error

    bp.java:45: q(java.lang.String) is already defined in a.bp
        public static boolean q(String s)
                              ^
    bp.java:54: cannot find symbol
    symbol  : class cL
    location: class a.bp
        public static cL q(boolean flag, boolean flag1, boolean flag2, boolean flag3, int i, int j, int k)
                      ^
    bp.java:56: cannot find symbol
    symbol  : class cL
    location: class a.bp
            cL cl;
            ^
    bp.java:57: cannot find symbol
    symbol  : class cL
    location: class a.bp
            (cl = new cL(0x401050, 1)).w = -1;
                      ^
    bp.java:60: cannot find symbol
    symbol  : variable a
    location: class a.bp
            if(a.q())
               ^
    bp.java:66: incompatible types
    found   : int
    required: boolean
            flag = i << 16 | j;
                           ^
    bp.java:72: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String q = cy.q("onlina");
                                  ^
    bp.java:73: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String w = cy.q("busy");
                                  ^
    bp.java:74: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String e = cy.q("be right back");
                                  ^
    bp.java:75: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String r = cy.q("away");
                                  ^
    bp.java:76: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String t = cy.q("in a call");
                                  ^
    bp.java:77: cannot find symbol
    symbol  : variable cy
    location: class a.bp
        private static String y = cy.q("out to lunch");
                                  ^
    bp.java:81: cannot find symbol
    symbol  : variable cy
    location: class a.bp
            cy.q("Visible");
            ^
    bp.java:82: cannot find symbol
    symbol  : variable cy
    location: class a.bp
            cy.q("Invisible");
            ^
    bp.java:83: cannot find symbol
    symbol  : variable cy
    location: class a.bp
            cy.q("Ghost");
            ^
    15 errors

    and this is the code of class file

     
    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 1/7/2012 6:18:57 AM
    // Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
    // Decompiler options: packimports(3) 
     
    package a;
     
     
    // Referenced classes of package a:
    //            a, cL, cy
     
    public final class bp
    {
     
        public bp()
        {
        }
     
        public static String[] q()
        {
            String as[];
            (as = new String[6])[0] = q;
            as[1] = w;
            as[2] = e;
            as[3] = r;
            as[4] = t;
            as[5] = y;
            return as;
        }
     
        public static int q(String s)
        {
            if(s.equals(q))
                return 1;
            if(s.equals(w))
                return 2;
            if(s.equals(e))
                return 3;
            if(s.equals(r))
                return 4;
            if(s.equals(t))
                return 5;
            return !s.equals(y) ? 0 : 6;
        }
     
        public static boolean q(String s)
        {
            for(int i = 0; i < 6; i++)
                if(s.equalsIgnoreCase(q()[i]))
                    return true;
     
            return false;
        }
     
        public static cL q(boolean flag, boolean flag1, boolean flag2, boolean flag3, int i, int j, int k)
        {
            cL cl;
            (cl = new cL(0x401050, 1)).w = -1;
            cl.q = -1;
            cl.q(0, 0, flag);
            if(a.q())
            {
                cl.q(0, 1, flag1);
                cl.q(0, 2, flag2);
                cl.q(0, 3, flag3);
            }
            flag = i << 16 | j;
            cl.q(0, 0, flag);
            cl.q(0, 1, k);
            return cl;
        }
     
        private static String q = cy.q("onlina");
        private static String w = cy.q("busy");
        private static String e = cy.q("be right back");
        private static String r = cy.q("away");
        private static String t = cy.q("in a call");
        private static String y = cy.q("out to lunch");
     
        static 
        {
            cy.q("Visible");
            cy.q("Invisible");
            cy.q("Ghost");
        }
    }


    any help

    * sorry if my English is bad


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Error while compile

    I guess the decompiler did not do a good job. You will have to spend more time with the source to create a good version.
    Can you contact the author of the program and get a clean copy of the source from him?

  3. #3
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default Re: Error while compile

    i would like to add, i think what he means with clean is readability, naming conventions
    its hard to understand most of the codes, its hard to tell which is class which are variables, its even hard to determine what those methods are for.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Error while compile

    It appears you are trying to reverse engineer an application - I would highly discourage this behavior, and - while I do not know the license of the software - given it appears to be obfuscated would be confident in my guess that it was not meant to be decompiled, and that you are violating the license of that software. Unless you convince me otherwise, I will lock this thread.

Similar Threads

  1. Replies: 1
    Last Post: June 9th, 2011, 08:51 AM
  2. [Compile Error] Whats wrong with that ?
    By Anomis in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 5th, 2011, 11:01 AM
  3. Compile Error, tried everything please help
    By cdub0 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 17th, 2011, 03:31 AM
  4. What's wrong. Compile Ok but error when execute.
    By hantuapi in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 1st, 2011, 05:33 AM
  5. [SOLVED] Picture won't go with the .jar (Wrong code or compile error?)
    By Fermen in forum Object Oriented Programming
    Replies: 3
    Last Post: March 15th, 2011, 05:22 PM