Why were javelins and other missile weapons phased out by infantry in Europe?

by hahaha01357

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?

OldWorldGlory

You might be interested in past posts on this topic:

You can ask followup questions by posting your questions in the comments with experts tagged to direct questions to them.