iSeries Toolbox for Java: Running an iSeries Command.
There is a bit more to it than you'd think, but it's all covered here.