Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9307

Re: Compile Problem involving Dependencies

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Compile Problem involving Dependencies
Date 2011-10-29 17:06 -0700
Organization http://groups.google.com
Message-ID <31537605.902.1319933203136.JavaMail.geo-discussion-forums@prmv24> (permalink)
References <Xns9F8D860F77952jpnasty@94.75.214.39> <j8hch3$atn$1@dont-email.me> <Xns9F8D89FDC437Fjpnasty@94.75.214.39> <j8hkcj$t33$1@dont-email.me>

Show all headers | View raw


markspace wrote:
> Novice wrote:
>>  The fresh build did the trick; all the compiler
>> errors went away and I was able to run the applet successfully. I like
>> Eclipse but it does seem to get confused sometimes; >
> 
> You're welcome.  NetBeans seems to have the same problem.  Periodically 

Pretty much *all* build systems have this problem.

> weird errors show up and I have to do the "clean and rebuild full 
> project."  I guess it might be common behavior related to some compiler 
> API they both use, since Java has made one available for programmers a 
> while back.
> 
> *shrug*  At least you didn't have to reach for the "big red switch."

It's common behavior to all build systems, particularly Java-esque ones that track dependencies through the .class files in the "-d" target directory of javac.

In the face of refactoring and certain strange scenarios, .class files remain in the target directory for which either the source files have a changed transitive dependency or the source no longer exists or a constant is not deemed worthy of a recompile or what-all.

Later another class sees something in the now-no-longer-valid .class file and weirdness ensues.  Finally the hapless programmer does a full "clean", and voilĂ ! Problem solved.

-- 
Lew

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Compile Problem involving Dependencies Novice <novice@example..com> - 2011-10-29 17:06 +0000
  Re: Compile Problem involving Dependencies markspace <-@.> - 2011-10-29 10:18 -0700
    Re: Compile Problem involving Dependencies Novice <novice@example..com> - 2011-10-29 17:29 +0000
      Re: Compile Problem involving Dependencies markspace <-@.> - 2011-10-29 12:32 -0700
        Re: Compile Problem involving Dependencies Lew <lewbloch@gmail.com> - 2011-10-29 17:06 -0700
          Re: Compile Problem involving Dependencies Roedy Green <see_website@mindprod.com.invalid> - 2011-10-30 01:28 -0700
  Re: Compile Problem involving Dependencies Martin Gregorie <martin@address-in-sig.invalid> - 2011-10-29 17:24 +0000
  Re: Compile Problem involving Dependencies Roedy Green <see_website@mindprod.com.invalid> - 2011-10-29 23:25 -0700

csiph-web