On 17/10/06, Chavdar Botev <[EMAIL PROTECTED]> wrote:
Hi! I've come accross the following problem trying to compile Java 5 classes with generics using Ant 1.6.5. I've attached project with sample Java classes and a build.xml file. NOTE: Please create a src/test subdirectory and save the attached .java files into it. The mailing list server gave me a hard time acepting an email with the archived project files. :( A clean build of the above project works just fine and compiles without a problem. If after that, I touch the Test3.java file the build fails with the following error:
[javac] C:\src\appforge\test\src\test\Test3.java:5: incompatible types
[javac] found : test.Base [javac] required: test.Sub [javac] public Sub p() {return this.getV();} [javac] ^ [javac] 1 error
I must admit that this behaviour is really strange. I am interested in helping you but the problem is that I didn't receive any .java files. Please try to prvide them again. Initially, I thought that this was a problem with the Java compiler.
After touching Test3.java, I tried running javac manually: javac -sourcepath src -d bin -g -source 1.5 -target 1.5 src\test\*.java It turned out that with the above command-line the project compiled OK. The project also compiles without a problem in Eclipse 3.2.1. Am I missing anything? It is my understanding that the build file and the command line should produce the same results. Upon further experimentation, if I uncomment the method in Test2.java fixes the problem. Touching Test3.java does not break the build. Thanks, Chavdar --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Regards, Petar! Karlovo, Bulgaria.