Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.help Subject: Re: IDE suggestion Date: Sun, 10 Mar 2013 09:09:50 +0000 Organization: A noiseless patient Spider Lines: 67 Message-ID: References: <16cce9e6-429a-424a-963b-69a629768a47@googlegroups.com> <2edqv9-7rc.ln1@s.simpson148.btinternet.com> <3io0j8tltj1rivd05uqr3qppd2203rvcou@4ax.com> <1nonj8du8l8o6o4rmqv5bk1dnhgsbf12qo@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="7e194865abb1454ff7685570b1bd8709"; logging-data="20232"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PFOsnJ78sUWKhd2fqrOlKzpWzOeojQc0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 In-Reply-To: <1nonj8du8l8o6o4rmqv5bk1dnhgsbf12qo@4ax.com> Cancel-Lock: sha1:L/SX92zIGL++HPhkepv0BIqLUtE= Xref: csiph.com comp.lang.java.help:2572 On 10/03/13 01:35, Roedy Green wrote: > On Fri, 01 Mar 2013 12:30:45 +0000, Steven Simpson > wrote, quoted or indirectly quoted someone who said : > >> That only happens if the output directory is included in the classpath. > I have not done it any other way with ANT. > > Even if you put them somewhere else, JavaC has to know that place. It does in both Ant configurations. Here's the default: [javac] Compilation arguments: [javac] '-d' [javac] '/scratch/simpsons/Scratch/Coding/antfail2/classes' [javac] '-classpath' [javac] '/scratch/simpsons/Scratch/Coding/antfail2/classes' [javac] '-sourcepath' [javac] '/scratch/simpsons/Scratch/Coding/antfail2/src' [javac] '-g:none' Here's includeDestClasses="false": [javac] Compilation arguments: [javac] '-d' [javac] '/scratch/simpsons/Scratch/Coding/antfail2/classes' [javac] '-classpath' [javac] '' [javac] '-sourcepath' [javac] '/scratch/simpsons/Scratch/Coding/antfail2/src' [javac] '-g:none' The output directory (as set by -d) is the same in both cases. Only the classpath has changed. > I > would be surprised it if got suddenly stupid about recompile. I don't know what you mean by stupid, but the behaviour is indeed different: 1. With "-d X -cp X:Y:Z", the compiler checks the timestamp of X/Foo.class against Foo.java, and only recompiles Foo if Foo.java is newer (in which case, let's say that Foo passes the test). 2. With "-d X -cp Y:Z", the compiler compiles Foo.java regardless. For the reasons stated in my first post, I don't trust behaviour #1. > However, > I have not done any experiments and it sounds like you have. In my last post, I determined that Ant has #1-like behaviour. When Ant invokes javac, Ant performs the test described in #1, and only submits source files to javac for classes which pass the test. Under the default Ant configuration, javac then performs the same test, which always passes, because Ant has filtered the input to include only those classes which will pass. The tests performed by javac are redundant when invoked by Ant. Under the alternative configuration, javac is instructed not to perform the tests, but the result is the same because Ant is still performing them. So #1-like behaviour seems to be unavoidable with the Ant task. -- ss at comp dot lancs dot ac dot uk