And they drove not out the Canaanites which dwelt in Gezer,
&c.] Which was the border of their tribe length ways, and was near the sea, ( Joshua 16:3 ) ; in this they did not obey the command of God, and either they did not drive them out, because they could not, God not delivering them up into their hands, because of their sins; or through their slothfulness, or it may be through covetousness, being willing to make some advantage to themselves by them, being a trading people, which seems to be intended in the next clause:
but the Canaanites dwelt among the Ephraimites unto this day;
which Joshua, the writer of this book, might truly say, and be no objection to it, since the same is observed after his death, ( Judges 1:29 ) ; and indeed they continued to dwell there until the times of Solomon, when it was taken by Pharaoh king of Egypt, and given as a present to his daughter, the wife of Solomon, ( 1 Kings 9:15-17 ) ; and though this clause does not furnish out an argument against the writing of this book by Joshua, yet, from the instance given, it appears it must have been written before the times of Solomon, and so not by Ezra, as some:
and serve under tribute;
so that they were under their power, and therefore could have driven them out, or slain them, as by the command of God they should; but they spared them for the sake of the tribute they received from them, which seems to agree with the character of the Ephraimites, ( Hosea 12:8 ) .