What does John 20:19 mean?
When Jesus was arrested, all the disciples ran away (Matthew 26:56). John and Peter followed the arresting mob at a distance (John 18:15), and John was at the foot of the cross when Jesus was executed (John 19:25–27). Other than that, Jesus' closest followers have apparently been in hiding since His capture. John again uses the term "the Jews" in reference to the religious leaders of Jerusalem and their loyal adherents. It would be reasonable for the disciples to assume that if Jesus' enemies could have Him killed, they might well be looking to get rid of His students, as well.That Jesus appears in a locked room means that His resurrected body is not blocked by physical barriers. John and Peter saw empty grave clothes in the tomb (John 20:6), but the stone was moved aside (John 20:1). That open tomb, it seems, was a sign for Jesus' followers, not a means for His escape. It allowed them to see what had happened but wasn't done "so that" Jesus could come out.
Jesus' comment here echoes what He said during the Last Supper (John 14:27). It's also the sort of thing a person might say in polite greeting. There's a good chance it was also meant to reduce any sense of fear. When these men had seen Jesus walking on water, they were terrified (John 6:19). They were probably startled to see Him appear, alive and well, in a secured room.
Not long before this moment, Mary Magdalene and other women had come to tell the disciples that they had seen Jesus alive (John 20:18; Luke 24:10–11) and were apparently ignored. One can only imagine the vindication she would have felt when learning that they, too, had encountered Him.