There shall not any man be able to stand before you all the days of your life. As I was with Moses, so I will be with you; I will not fail you, nor forsake you.
      (1.) That he conform himself in every thing to the law of God, and make this his rule Joshua 1:7; Joshua 1:8. God does, as it were, put the book of the law into Joshua's hand; as, when Joash was crowned, they gave him the testimony,2 Kings 11:12. And concerning this book he is charged, [1.] To meditate therein day and night, that he might understand it and have it ready in him upon all occasions. If ever any man's business might have excused him from meditation, and other acts of devotion, one would think Joshua's might at this time. It was a great trust that was lodged in his hands; the care of it was enough to fill him, if he had had ten souls, and yet he must find time and thoughts for meditation. Whatever affairs of this world we have to mind, we must not neglect the one thing needful. [2.] Not to let it depart out of his mouth; that is, all his orders to the people, and his judgments upon appeals made to him, must be consonant to the law of God; upon all occasions he must speak according to this rule,Isaiah 8:20. Joshua was to maintain and carry on the work that Moses had begun, and therefore he must not only complete the salvation Moses had wrought for them, but must uphold the holy religion he had established among them. There was no occasion to make new laws; but that good thing which was committed to him he must carefully and faithfully keep, 2 Timothy 1:14. [3.] He must observe to do according to all this law. To this end he must meditate therein, not for contemplation sake only, or to fill his head with notions, or that he might find something to puzzle the priests with, but that he might, both as a man and as a magistrate, observe to do according to what was written therein; and several things were written there which had particular reference to the business he had now before him, as the laws concerning their wars, the destroying of the Canaanites and the dividing of Canaan; c. these he must religiously observe. Joshua was a man of great power and authority, yet he must himself be under command and do as he is bidden. No man's dignity or dominion, how great soever, sets him above the law of God. Joshua must not only govern by law, and take care that the people observed the law, but he must observe it himself, and so by his own example maintain the honour and power of it. First, He must do what was written. It is not enough to hear and read the word, to commend and admire it, to know and remember it, to talk and discourse of it, but we must do it. Secondly, He must do according to what was written, exactly observing the law as his copy, and doing, not only that which was there required, but in all circumstances according to the appointment. Thirdly, He must do according to all that was written, without exception or reserve, having a respect to all God's commandments, even those which are most displeasing to flesh and blood. Fourthly, He must observe to do so, observe the checks of conscience, the hints of providence; and all the advantages of opportunity. Careful observance is necessary to universal obedience. Fifthly, He must not turn from it, either in his own practice or in any act of government, to the right hand or to the left, for there are errors on both hands, and virtue is in the mean. Sixthly, He must be strong and courageous, that he might do according to the law. So many discouragements there are in the way of duty that those who will proceed and persevere in it must put on resolution. And, lastly, to encourage him in his obedience, he assures him that then he shall do wisely (as it is in the margin) and make his way prosperous,Joshua 1:7; Joshua 1:8. Those that make the word of God their rule, and conscientiously walk by that rule, shall both do well and speed well; it will furnish them with the best maxims by which to order their conversation (Psalms 111:10); and it will entitle them to the best blessings: God shall give them the desire of their heart.