Well generally it's very difficult to get Java to do such things simply because it runs inside its own virtual machine (the JVM). However, and I don't recommend this, you can use the Robot class to click on exact pixel positions and move the mouse among other things. But this probably isn't suited for your needs.
I would look into C# like your friend suggested. If you know Java, it's very similar, and there are tons of benefits to using the language (linq statements, lambdas, operator overloading, class extension methods and so on). However keep in mind that C# is made to run on the Windows OS.
Good luck!