Fix for a potential NPE
Fix findbugs findings and remove dead code
updating the jre to version 7 on system vms

(cherry picked from commit fc2e7ec70a1cc48a10a168ec3df607b49a7bcdf6)
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
update packages list before getting jre 7

(cherry picked from commit 5121f8cd4e4adcdf23b6ec25cb1c28bec8f417a7)
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>