Python has a fantastic catalog of libraries for almost any purpose. However, sometimes you may have old java code that already does the trick and you are not willing to spend the time rewriting it in python. In these cases it is easiest to include the java code into the robot. I made this example robot that has a java command line tool included as a fat jar. The results are available in Github
In more complicated setups, I recommend using JRobot Remote Server but in this example that would have been an overkill.