Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2572
| From | Steven Simpson <ss@domain.invalid> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: IDE suggestion |
| Date | 2013-03-10 09:09 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <u7vt0a-6pa.ln1@s.simpson148.btinternet.com> (permalink) |
| References | (2 earlier) <16cce9e6-429a-424a-963b-69a629768a47@googlegroups.com> <2edqv9-7rc.ln1@s.simpson148.btinternet.com> <3io0j8tltj1rivd05uqr3qppd2203rvcou@4ax.com> <lkj60a-lof.ln1@s.simpson148.btinternet.com> <1nonj8du8l8o6o4rmqv5bk1dnhgsbf12qo@4ax.com> |
On 10/03/13 01:35, Roedy Green wrote:
> On Fri, 01 Mar 2013 12:30:45 +0000, Steven Simpson <ss@domain.invalid>
> 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 <javac> 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 <javac> task.
--
ss at comp dot lancs dot ac dot uk
Back to comp.lang.java.help | Previous | Next — Previous in thread | Find similar | Unroll thread
IDE suggestion "Schizoid Man" <schiz_man@21stcentury.com> - 2013-02-24 11:08 +0000
Re: IDE suggestion "John B. Matthews" <nospam@nospam.invalid> - 2013-02-24 15:00 -0500
Re: IDE suggestion Lew <lewbloch@gmail.com> - 2013-02-24 12:23 -0800
Re: IDE suggestion "Schizoid Man" <schiz_man@21stcentury.com> - 2013-02-24 20:40 +0000
Re: IDE suggestion Lew <lewbloch@gmail.com> - 2013-02-24 14:51 -0800
Re: IDE suggestion Roedy Green <see_website@mindprod.com.invalid> - 2013-02-25 11:27 -0800
Re: IDE suggestion Steven Simpson <ss@domain.invalid> - 2013-02-24 21:31 +0000
Re: IDE suggestion Roedy Green <see_website@mindprod.com.invalid> - 2013-03-01 00:18 -0800
Re: IDE suggestion Steven Simpson <ss@domain.invalid> - 2013-03-01 12:30 +0000
Re: IDE suggestion Roedy Green <see_website@mindprod.com.invalid> - 2013-03-09 17:35 -0800
Re: IDE suggestion Steven Simpson <ss@domain.invalid> - 2013-03-10 09:09 +0000
csiph-web