First commit on the Java implementation. Solves some numbers. However, there's some problems involving small numbers/prime numbers. To be fixed.