wierd java 1.5 compile issues

Hi all,

I have an instance where under CodeGuide 7.0, my code compiles fine. However when using the 1.5 beta 2 compiler from the command line (under Windows or Linux) 11 errors pop up out of no where (it is compiled using what is essentially an ANT script). Does anyone have any clues as to what might be causing this difference to show up?

Thanks,

Gil

[377 byte] By [Gilthalas] at [2007-9-30 16:32:20]
# 1
What are the 11 errors ?
Martin3 at 2007-7-6 0:14:36 > top of Java-index,Administration Tools,Sun Connection...
# 2

Well, I'm not sure if they will help, but I can give you one example (I've stripped packages, renamed classes for work reasons). I've got one class that looks like this:

public class Foo<B extends CB>//CB is an interface here

{

public B body;

public MySymbol symbol;

public Color color;

public Foo (B body, MySymbol symbol, Color color)

{

this.body = body;

this.symbol = symbol;

this.color = color;

}

}

and another class that looks like this:

public class Bar<B extends CB> extends Foo<B>

{

public Bar (MyFunction centerToBody,

B body,

MySymbol symbol,

Color color)

{

super(body, symbol, color);

}

protected Bar (Bar adapter)

{

super(adapter.body, adapter.symbol, adapter.color);

}

}

When compiling on the command line only (not in CodeGuide), an error like this pops up:

[javac] cannot find symbol : constructor Foo(CB, MySymbol, java.awt.Color)

[javac] location: class Foo<B>

[javac] super(adapter.body, adapter.symbol, adapter.color);

[javac]^

But as you can clearly see, Foo has a constructor that matches that, since B extends CB.

Any thoughts? Especially as to why it compiles under CodeGuide and not the command line?

Gil

Gilthalas at 2007-7-6 0:14:36 > top of Java-index,Administration Tools,Sun Connection...
# 3
One of 11?Tough one. You may need to cast the B to a CB to get it to work. Also have you told the compiler ithe source is 1.5?
Martin3 at 2007-7-6 0:14:36 > top of Java-index,Administration Tools,Sun Connection...