Updating the java source.

updating the java source to use a template method to generate the maze
depending on the algorithm.