[SOLVED]Uncompilable source code - incompatible types WTF

Code which has been running fine all day suddenly gave me:

java.lang.RuntimeException: Uncompilable source code - incompatible types
required: mygame.AITypes.AI
found: mygame.AITypes.Thrower

This is code that has not been changed and ran before without error. Netbeans just suddenly won’t let me run it anymore. Literally nothing has changed. For this reason I’m only posting a small amount of code - wondering if anyone else has had a similar problem and knows what to do?

I have an interface: AI, and then a bunch of classes implement it, for example, Defender, Attacker, Keeper, Thrower and so on.

team1.players[3].ai.ai = new Defender(team1.players[3].ai,main.camControl.box);        
team1.players[4].ai.ai = new Thrower(team1.players[4].ai,main.camControl.box);
team1.players[5].ai.ai = new Defender(team1.players[5].ai,main.camControl.box);
team1.players[6].ai.ai = new Attacker(team1.players[6].ai,main.camControl.box);

The second line, Thrower, is whats causing the error. It doesn’t think it is of type AI. Changing it to Defender or other types works fine.

The Thrower class

public class Thrower implements AI

Showed me an error saying something about duplicate class… but when I moused over it the error quickly vanished so thats all I could catch. Again this code was all running fine and nothing has been changed.

I’m kinda confused.

EDIT: Restarted my pc and it went away? Now my sound has gone off for no obvious reason. Love it

If you are using the JME SDK (Netbeans), go into your project settings and turn off “Compile on save”. Your builds will take a little longer but you will avoid a lot of weird errors caused by the incremental compiler.