in reply to perl script handled by java

So I am just looking for suggestions

Look in the manual, use system/process as search term. Heck, you can even use STDIN/STDOUT/STDERR. This is universal. It should take all of 1 minute with a good search engine.