use a loop for testing jdk paths

Signed-off-by: Joe Buck <jbbuck@gmail.com>