What is the connection of learning archery to lamenting their deaths?
Rashi: Now that the Giborim died, Bnei Yehudah must learn warfare and archery.
Radak: The Kinah (lamentation) does not begin here, rather, (verse 19) "ha'Tzevi Yisrael
What is "Sefer ha'Yashar", and where is [teaching archery] written there?
Rashi, based on Avodah Zarah 25a: Sefer ha'Yashar is Bereishis, the Sefer of straight people, i.e. Avraham, Yitzchak and Yakov. It says "Yadcha b'Oref Oyvecha 1 " (Bereishis 49:8). In what kind of fighting is the hand opposite the forehead, which is opposite the back of the neck? It is archery.
Radak citing Targum Yonasan: Sefer ha'Yashar is the Torah. It says "Yadcha b'Oref Oyvecha", "Kara Shachav ka'Ari" (Bamidbar 24:9) and "Yadav Rav Lo v'Ezer mi'Tzarav Tihyeh" (Devarim 33:7). Through [Yehudah], Pelishtim will be subdued, like David, Uziyah and Chizkiyah did. The bow is the primary war weapon. It is often mentioned with Gevurah, e.g. "Keshes Giborim Chatim" (1:2:4), "v'Nilkedah Giboreha Chitesah Kashsosam" (Yirmeyah 51:56), "v'Nasata Keshes Nechushah Zero'osai" (22:35). Everyone in Yehudah will teach his friend archery, for they are the primary fighters in Yisrael.
Malbim: It is the Sefer (Parshah) mentioned in Shemos (34:27) "Kesav Lecha
Maharsha (25a): The Gemara means that when the enemy turns his Oref to you and flees, you cannot kill him vi a sword, rather, via a bow.