This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Mar 16, 2013 1:16 PM by 956015 Go to original post RSS
  • 15. Re: Source code won't recompile
    morgalr Explorer
    Currently Being Moderated
    I had this problem one time... I some how made a copy of the source file and put it some place other than the project folder, but managed to get the project to reference the copy and not the file in the project folder. It was a head banging experience to say the least.

    You can see if you are referencing the correct file by removing the source file from your project and seeing if your project still compiles... if it does, then find the source it's really using.

    Had a friend do almost the same thing... but with the .class files, he had a reference to objects from .class files and thought he included the source--he did not, so when he included the source in the project and deleted the old class files everything started working.
  • 16. Re: Source code won't recompile
    956015 Newbie
    Currently Being Moderated
    Thank you for all the responses.

    The problem was exactly as J2EE described. I was compiling only my main program which was compiling some but not all the classes. So I had my main program that used the AFrame class and the AFrame class that used the APanel class. I guess recompiling my main program only recompiled my AFrame class when I made structural changes to it which in turn recompiles my APanel class?

    I've only written a few programs in Java and I guess I never run into this situation before which I why I always thought that recompiling one program would recompile all the necessary classes as well.

    Anyway thank you for the help and sorry for being a newb at java. =]
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points