Before the sending out the leaders of the tribes to spy out the land, Moses renamed his trusted servant Hoshea (הוֹשֵׁעַ) to Yehoshua (יְהוֹשֻׁעַ), appending the letter Yod (י) to make his name begin with a divine prefixive (יָהּ־). The Talmud (Sotah 34b) states that Moses foresaw the treachery and faithlessness of the spies and appended the Yod to remind Hoshea that YHVH (יהוה) must come first. This renaming of Hoshea, however, was certainly prophetic, since Joshua was chosen to be the successor of Moses who would finally lead the people into the promised land. Notice that the name Yehoshua (i.e., Joshua) and Yeshua (i.e., Jesus) come from the same root (i.e., yasha: ישׁע) meaning "salvation" or deliverance (in the Greek LXX, Joshua is spelled Ιησους, the same spelling for Jesus in the New Testament). Indeed, in the Book of Nehemiah, Yehoshua is explicitly called Yeshua (יֵשׁוּעַ), the name often transliterated as "Jesus" (Neh. 8:17).
There are a number of similarities between Joshua and Jesus given in the Torah. For example, Joshua was a descendent of Joseph from Ephraim (lit., "double fruit"), and Yeshua came as Messiah ben Yosef, the "son of Joseph" who would come from Bethlehem of Ephrata (אֶפְרָתָה), a term that also means "fruifulness." Joshua was Moses' faithful companion at Sinai (Exod. 24:13) and overseer of the "Tent of Meeting" (אהל מועד), taking every opportunity to be near God's presence (Exod. 33:11). He was a capable commander of the armies of Israel who regularly routed the enemy in battle (Exod. 17:9, etc.). Joshua was truly humble and of impeccable moral character, a true servant of Israel filled with Holy Spirit of God (Num. 27:18). Therefore both Joshua and Yeshua loved God's house (Exod. 33:11; Luke 2:49), both were faithful leaders of Israel (Deut. 1:37-38; Matt. 2:6); and both were directly ordained by God. Moreover, Joshua was tested and found steadfast in his faith (Num. 32:12); he was willing to be "despised and rejected of men" rather than appease the mob, just as was Yeshua. Both Joshua and Yeshua appointed 12 men (Josh. 4:4; Mark 3:16-19); both led the people of God to the Promised Land and engaged in warfare for the Kingdom of Heaven; both performed various miracles; both allotted the inheritance of the LORD to God's people (Deut. 1:38, 3:28), both circumcised the people (Joshua at Gilgal; Yeshua in the Spirit); both married Gentile brides (Joshua is said to have married Rahab, Yeshua married the faithful of the nations), both signified salvation by means of the "scarlet cord," and so on. Moses was the "lawgiver" of Israel who was unable to give rest (salvation) to Israel; that honor was given to Joshua, who brought the people into the promised land after Moses had died on Mount Nebo (see Rom. 7:1-4).
Joshua's full name was "Joshua the son of Nun" (יְהוֹשֻׁעַ בִּן־נוּן). The Talmud notes that the word Nun (נוּן) means "fish," a symbol of activity and life. The first mention of the word is found in Exodus 33:11 in reference to Yehoshua. One application here is to note that Yehoshua, the one who succeeded Moses and was able to enter the Promised Land, was the "Son of Life" - a clear picture of Yeshua our Mashiach, blessed be He...
A midrash says that when Yehoshua was born, no one took note, but when he died, all of Israel took note. Nonetheless, the Israelites did not mourn for him properly. One was busy with his vineyard, the other with his field, yet another with his coal. "The Holy One, Blessed be He, therefore sought to make the whole world quake" (Midrash Shmuel 23:7). This is also an apt description of Yeshua as Mashiach ben Yosef, the Suffering Servant, whose birth went unnoticed, but His death and resurrection indeed shook the world!