The velocity of the javelin is the first derivative of the position:
javelin.vx = speedX;
javelin.vy = speedY - g * timeT
Assuming a well-thrown javelin always points in the direction of travel, the angle can be found using the arctangent function:
javelin.angle = atan(javelin.vy / javelin.vx);
If you are writing code, you can prevent a division by zero by using a version of arctangent that takes the rise and run as separate parameters:
javelin.angle = atan2(javelin.vy, javelin.vx);