You need to know what hash algorithm was used. Once you know that you can brute force it with something like this:
String realhash = \
for (Integer x=0; x<1000000; x++)
String mypass = String.format(%06d", x);
String myhash = hash(mypass);
System.out.println("The password is " + mypass);
My syntax may be a little off (I'm not a Java programmer), but that code shows essentially what you need to do.
BS in IT: Security, CISSP, CEH, EnCE. MS in progress.