It seems that for many classical civilizations, the infantryman often carried a javelin (or dart etc) into battle along with their primary weapon. The Romans especially seemed to have used the pila with great effectiveness. So why did later armies decide to drop this part of their arsenal?
You might be interested in past posts on this topic:
Why did the javelin, once prevalent in the ancient world, disappeared from the battlefield during the medieval era ?
^(23 Apr 2013 | 14 comments)
^(/u/Celebreth describes the use of Javelin's in Ancient and Medieval Europe as well as pros and cons thereof.)
What were the advantages of javelin troops compared to archers?
^(27 Sep 2015 | 27 comments)
^(/u/BlueStraggler describes the role of the Pilum in Roman warfare as opposed to javelins as skirmishing weapons.)
Why did the pilum fall out of favour for Roman infantry?
^(18 Jun 2014 | 35 comments)
^(/u/Ambarenya describes why and how javelins were superseded by darts aka plumbata in Late Roman Warfare.)
You can ask followup questions by posting your questions in the comments with experts tagged to direct questions to them.