Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Is it necessary the source file should be at the same location with the class file? Date: Mon, 25 Jul 2016 21:03:14 -0400 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: References: <8bnf6d-sua.ln1@s.simpson148.btinternet.com> <209i6d-u46.ln1@s.simpson148.btinternet.com> NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:35138 On 7/25/2016 4:21 PM, Steven Simpson wrote: > On 24/07/16 23:06, Arne Vajhøj wrote: >> On 7/24/2016 5:08 PM, Steven Simpson wrote: >>> With the output directory in the classpath, doesn't it mean that javac >>> will attempt a kind of incremental build? And doesn't it then miss some >>> not particularly extraordinary cases (inlined constants; return types), >>> leading to broken builds? >> The problem you mention is real and need to be handled. There are >> ways to do that via various build scripts from OS shell to ant to >> newer build frameworks. > > I was not convinced that Ant would be enough, as the task > behaves largely as [javac -classpath out -d out], comparing timestamps > of corresponding .java and .class files, so it's exposed to the same > problems. Combining with should do better, but it > looked like it would still miss inlined constants, so I tried it out: > So Ant will handle the two mentioned cases if used with and > javac from JDK8. That was not my point. My point was the much simpler fact that with a script it is easy to start by deleting all class files. :-) Arne