Ok now what, no Java?

I have a plain jane java application, not servlet/jsp. it is the google api soap engine. I need to know if I can do this.

  1. get info from html/php form
  2. send info to command line "java SearchTest “user input”
  3. somehow process the results back into php
  4. deliver the page

Can I do this?