Hi Experts I am seeking help from you guys for my below problem.
I have following classes : Class TestAntError public class TestANtError { final protected> void add(final K setDS) throws Exception { //synchronized final protected void add(final K setDS) throws Exception { if(setDS == null) { throw new NullPointerException("setDS cannot be null !!"); } K thisSetDS =(K) new SetDS(); thisSetDS.add(setDS); } } Class SetDS import java.util.Map; import java.util.Set; import java.util.TreeMap; public class SetDS, T extends Comparable> { private Map vecMap_ = new TreeMap(); final public boolean add(SetDS rhs) { if(rhs == null) { throw new NullPointerException("rhs cannot be null !!"); } return false; } public SetDS() { } } In Eclipse IT compiles fine with just warnings but when I try to build it with ANT Build fails with following error. TestANtError.java:14: add(SetDS) in SetDS cannot be applied to (K) [javac] thisSetDS.add(setDS); [javac] ^ [javac] 1 error I am not sure whats the problem. Please help. Regards Nony -- View this message in context: http://www.nabble.com/Generics-code-Compile-in-Eclipse-3.4-%2C-compilation-fails-in-ANT1.7-%28JRE-1.6.0_07%29-tp22903702p22903702.html Sent from the Ant - Users mailing list archive at Nabble.com.