Update java folder.
Move package archives initialisation before checking installed packages.