Two prominent journalists were sentenced yesterday to at least five years in jail for revealing state secrets, just hours after a gunman tried to shoot one of them outside the Istanbul courthouse.