File>Project Properties> Build> checked "Compile on save"