I have about 200 files in my source tree. I compile by ant:
<target name="source" depends="init" description="compile the source " >
<javac srcdir="${src}" destdir="${build}" debug="on"
includeantruntime="false">
<classpath>
<fileset dir="${home}/code/lib" includes="*.jar"/>
<fileset dir="${home}/tomcat/lib" includes="*.jar"/>
</classpath>
<!-- <compilerarg line="-Xlint:unchecked"/> -->
</javac>
</target>
Even if I do "ant" consecutively, I get
source:
[javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes
There keeps being 1 file that keeps compiling, even if I changed
nothing. I know which file it is (DatePicker.java) and there is nothing
different about it. Its time signature is 12/2007 right in the middle of
all other files. What might be causing this OCD behavior?
Thanks in advance,
Sam
[...]
> source:
> [javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes
>
> There keeps being 1 file that keeps compiling, even if I changed
> nothing. I know which file it is (DatePicker.java) and there is
> nothing different about it. Its time signature is 12/2007 right in
> the middle of all other files. What might be causing this OCD
> behavior?
Here's one scenario: a non-public, top-level class in a differently
named file.
$ cat src/NewMain.java
class NewMain {
public static void main(String[] args) {
System.out.println(new Hello().toString());
}
}
$ cat src/NewClass.java
class Hello {
public Hello() {
System.out.println("Hi!");
}
}
$ ant run
[...]
-do-compile:
[javac] Compiling 1 source file to [...]/build/classes
[...]
run:
[java] Hi!
[java] Hello@71f6f0bf
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
> On 8/17/2010 11:40 AM, John B. Matthews wrote:
> > In article<i4dck3$ekh$1...@news.eternal-september.org>,
> > Sam Takoy<sam....@yahoo.com> wrote:
> >
> > [...]
> >> source:
> >> [javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes
> >>
> >> There keeps being 1 file that keeps compiling, even if I changed
> >> nothing. I know which file it is (DatePicker.java) and there is
> >> nothing different about it. Its time signature is 12/2007 right in
> >> the middle of all other files. What might be causing this OCD
> >> behavior?
> >
> > Here's one scenario: a non-public, top-level class in a differently
> > named file.
[...]
> Thanks. That wasn't it, but it forced me to look at the content of
> the file and I discovered what we wrong. See my post "jarsigner can't
> rename, ant keeps compiling".
Excellent. Can you elaborate?
<http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/bc737c2fa36d9214>