Fix the ordering of local artifact URLs on JDK8.

Fixes #1077. Closes #1078.