For thrusting (I don't know if you'd try to slash with it). The advantage is quite long reach. However it can't block arrows, and as only the tip is made of energy, it is vulnerable to be cut in half, or broken with a hammer.
*sigh* that would be a javelin
Well yes but.. no. Stahp it.
No, if you could stab and throw it, it would be a spear.
Javelins can't stab.
spears can't stab I don't think... could you find some evidence that they can? for personal curiosity:P
Copied it from reddit, I hope it's enough:
Spear: long shaft of wood with a metal tip. Can be used for stabbing or throwing.
Javelin: short shaft of wood with a sharpened end. Used for throwing.
Lance: A long and thicker pointy piece of wood designed to be carried by a horseman. Far too inconvenient for a single man to carry.
Pike: very very long staff with a metal dagger-like item strapped to the top. Used for foot soldiers to stab at horsemen from a safe distance.
A javelin would not be sufficiently different from the bow and arrow.