Separate the functions for finding the Screen and Java PIDs