Resolve problem with java downloading for spark images

Using the same way to resolve this problem as for vanilla images
(https://review.openstack.org/#/c/103176/)

Change-Id: I801c16abafcc33eb924b43eb5701f97f02671507