My grails app has an external java library which I developed. I want my grails app to be able to display my java library system.out statements (console output). How do I go about doing that?
I would rather not have to write it out to a file then read it in grails. There must be a better way of doing this.
**I want grails to display these to a text box as the happen(In a browser while its running(so the user can see))
Afer trying several of my own ways I have to settle for this way which I will post here. Thanks @Shaunak for your help and understanding.
**How I solved it.
In my java library I created a global class which all the System.outs will be wrote to
writeSouts(String sout){
//store here in a global string and keep appending to it as needs be
}
Then in grails constantly call the java library method. and using Ajax write it out to the browser window.
Hope this helps anyone in the future who encounters the same problem.
Also it is not for testing but an integral part of my web app so that the user of the web app can was the java library is doing in the background.