Passage
And Joshua charged them with an oath at that time, saying, Cursed be the man before Jehovah, that riseth up and buildeth this city Jericho: with the loss of his first-born shall he lay the foundation thereof, and with the loss of his youngest son shall he set up the gates of it.
Nearby Context
Joshua 6:24 And they burnt the city with fire, and all that was therein; only the silver, and the gold, and the vessels of brass and of iron, they put into the treasury of the house of Jehovah.
Joshua 6:25 But Rahab the harlot, and her father`s household, and all that she had, did Joshua save alive; and she dwelt in the midst of Israel unto this day, because she hid the messengers, whom Joshua sent to spy out Jericho.
Joshua 6:26 And Joshua charged them with an oath at that time, saying, Cursed be the man before Jehovah, that riseth up and buildeth this city Jericho: with the loss of his first-born shall he lay the foundation thereof, and with the loss of his youngest son shall he set up the gates of it.
Joshua 6:27 So Jehovah was with Joshua; and his fame was in all the land.
Study Lenses
The verse centers on "joshua", "charged", "oath", "time", "saying", "cursed", "before", and "jehovah". It is saying that the verse draws attention to "joshua" and "charged", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 25's "But Rahab the harlot and her father..." into verse 27's "So Jehovah was with Joshua and his...", so "joshua" and "charged" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "joshua" and "charged" with trust shaped by these words, not by a vague optimism outside the passage.