It's the scarcity of the parts, not the overall cost. Javelins require rare-earth minerals (which largely come from Russia) and rare silicon chips that are in short supply worldwide. I edited my original post to include a link to an article about the difficulties in replacing the diminishing stock of anti-tank weapons.