Fix name of machine mutex in installJava() method and update to use DynamicTasks
Merge pull request #1054 from grkvlt/fix/install-java-mutex

Fix name of machine mutex in installJava() method