Generally, Java is a bad language to hack/bot games with. It has very weak capabilities for accessing windows APIs due to it's portability. While you can use JNI and existing libraries that perform common functions like mouse emulation, it's usually much more of a pain in the arse that it would be to use the same things in C++ or other languages. If it were just a point & click bot you wanted to make like evan suggests, you might aswell use autoit or another macro program. If you're looking to make more advanced bots that read in game memory perhaps, you really should scrap Java in favour of C/C++/Pascal/VB6, maybe C#/VB.net, but they're not 'ideal' either.