How to use nagios to monitor none-web appications


dear :

In our company we use nagios to simulate login web applications, the plugin is webinject .
and we also develop script to simulate user login the app which has terminal command line .

but i wanna know how we can monitor and simulate user login non-web and none terminal app

for example : how can we monitor the application run on JAVA ? and others need to install client ?

Thanks !