Error While Compiling Class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goblert
    New Member
    • Jun 2008
    • 6

    Error While Compiling Class

    hey guys i had a java class file that i no longer have the source file for.
    i reversed it back to the source using DJ JAVA Decompiler as i had to edit some of the source. How ever when i try to compile the source into a new class i get some errors. I would greatly appreciate it if anyone could help me solve this delema.

    I tried to compile using NetBeans IDE, DJ JAVA Decompiler and javac.exe. All failed to compile. They all give the same error.

    I have included a couple of screen shots to make the situation a bit more clearer to those of you that are trying to help me.

    Thanks in advance.









  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    First remove all the lines such as:

    [code=java]
    exception;
    [/code]

    and remove the label that isn't even there according to the decompiler. That is
    quite goofy (and incorrect) decompiled code you're having there. I wouldn't trust
    it one single bit.

    kind regards,

    Jos

    Comment

    • goblert
      New Member
      • Jun 2008
      • 6

      #3
      i done what you said and now i have loads more red lines.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by goblert
        i done what you said and now i have loads more red lines.
        That code came from a decompiler? What a mess.
        Why did you say you had to use the decompiler again?
        Where did you get the java file that you've now lost from?

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by goblert
          i done what you said and now i have loads more red lines.
          Show us a bit of relevant code and the error messages it caused. I can't help
          you with just the information you supplied. Those 'exception' lines by themself
          are just plain wrong.

          kind regards,

          Jos

          Comment

          • goblert
            New Member
            • Jun 2008
            • 6

            #6
            Originally posted by r035198x
            That code came from a decompiler? What a mess.
            Why did you say you had to use the decompiler again?
            Where did you get the java file that you've now lost from?

            I used to tool called JAD to reverse the Client.class file back to Client.java source file. All the code is there. Its just the exceptions are a mess.

            Comment

            • BigDaddyLH
              Recognized Expert Top Contributor
              • Dec 2007
              • 1216

              #7
              Originally posted by goblert
              I used to tool called JAD to reverse the Client.class file back to Client.java source file. All the code is there. Its just the exceptions are a mess.
              Yuck. That sounds like a job-and-a-half.

              Comment

              • goblert
                New Member
                • Jun 2008
                • 6

                #8
                would any one be willing to add me on msn?
                i can send the source entire source file.
                its just i don't want to post it on here as it
                is private.

                goblert {at} hotmail.com

                regards goblert

                Comment

                • r035198x
                  MVP
                  • Sep 2006
                  • 13225

                  #9
                  Originally posted by goblert
                  would any one be willing to add me on msn?
                  i can send the source entire source file.
                  its just i don't want to post it on here as it
                  is private.

                  goblert {at} hotmail.com

                  regards goblert
                  No need for that.
                  Just post the first 4 error messages you get.
                  You still haven't answered my questions though. I want to make sure we are not doing anything illegal first.

                  Comment

                  • goblert
                    New Member
                    • Jun 2008
                    • 6

                    #10
                    i had the Source.java but my harddrive broke and i lost everything.
                    but i still had the Client.jar and Client.class on my server.
                    Then i reversed it back to Source.java.... .

                    The Errors Are:

                    init:
                    deps-clean:
                    Deleting directory C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\b uild
                    clean:
                    init:
                    deps-jar:
                    Created dir: C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\b uild\classes
                    Compiling 2 source files to C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\b uild\classes
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\Client.java: 55: not a statement
                    exception;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\Client.java: 78: not a statement
                    exception3;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\Client.java: 138: not a statement
                    exception;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\Client.java: 161: not a statement
                    exception3;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\javaapplicat ion1\Main.java: 55: not a statement
                    exception;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\javaapplicat ion1\Main.java: 78: not a statement
                    exception3;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\javaapplicat ion1\Main.java: 138: not a statement
                    exception;
                    C:\Documents and Settings\admin\ My Documents\NetBe ansProjects\Jav aApplication1\s rc\javaapplicat ion1\Main.java: 161: not a statement
                    exception3;
                    8 errors
                    BUILD FAILED (total time: 1 second)

                    Comment

                    • BigDaddyLH
                      Recognized Expert Top Contributor
                      • Dec 2007
                      • 1216

                      #11
                      Do you know Java? Is this someone else's code?

                      Comment

                      • goblert
                        New Member
                        • Jun 2008
                        • 6

                        #12
                        no but i am very good at batch.

                        Comment

                        • r035198x
                          MVP
                          • Sep 2006
                          • 13225

                          #13
                          Originally posted by goblert
                          no but i am very good at batch.
                          Why not just get the 'Source.java' again from where you got it in the first place?

                          Comment

                          • JosAH
                            Recognized Expert MVP
                            • Mar 2007
                            • 11453

                            #14
                            @goblert: please don't PM me for your problem: you post your problem here and
                            we're very willing to help you solve your problem in this forum. From what I can
                            see given your screendumps the decompiled code doesn't make much sense
                            and in order to solve your problem we do need to see more of your source code,
                            whether it is all yours or not.

                            kind regards,

                            Jos

                            Comment

                            Working...