It won't despawn over night, and will probably be within two or three tiles of you. Better yet, you'll be able to find the exact one currently "carrying" your javelin by using the look command. The look command should also give you a good idea of how severe the injury you dealt it is, so you can adjust your pursuit based on how difficult it will be to catch.