It really depends on how much experience you have with
Java programming. If you've been doing Java development for some time now (especially for work), you could probably study for a few weeks and be ready.
If, on the other hand, you've decided that a good way to learn Java is to get certified (or, worse yet, you've decided that a good way to learn to program is to get certified), you may want to sock away a couple months before you're ready.
It really varies based upon the individual and how much experience you have, as well as how much time you can dedicate to it each day.