Is it Strength because it's a Thrown javelin (like a regular javelin), or Dexterity because of the wording of the descriptive text below? Specifically: 'make a ranged weapon attack' implies Dexterity to me.
This Javelin is a Magic Weapon. When you hurl it and speak its Command Word, it transforms into a bolt of lightning, forming a line 5 feet wide that extends out from you to a target within 120 feet. Each creature in the line excluding you and the target must make a DC 13 Dexterity saving throw, taking 4d6 lightning damage on a failed save, and half as much damage on a successful one. The Lightning Bolt turns back into a Javelin when it reaches the target. Make a ranged weapon Attack against the target. On a hit, the target takes damage from the Javelin plus 4d6 lightning damage.
The javelin's property can't be used again until the next dawn. In the meantime, the Javelin can still be used as a Magic Weapon.