Nagios plugin creation, integration with Java standalone
===

I have written a standalone java application that accepts command line arguments, performs certain operations on MBean, evaluates and exits with one of the Nagios status codes OK(0), WARNING(1), CRITICAL(2) or UNKNOWN(3) by printing to the System.out. I have mostly worked on windows environment, new to linux ubuntu 10.04.3 LTS; would like to know the steps on how to create a Nagios plugin so that it invokes this standalone java application and publishes the result on the Nagios web console.