I have a Java web application that makes use of certain libraries for example: Ghost Script for converting PDFs to TIFFs and Tesseract for OCR. There are java wrappers for both of these: Ghost4J and Tess4J.
What are some things I should think about when deciding whether to use the libraries or issue a command line process from my web application?
Off the bat what I'm noticing is that command line operations are slightly faster and don't take a toll on my application. For example 100 users sending PDFs that need to be converted to TIFFs using Ghost4j makes Java run at more that 100% CPU which makes the entire web application unresponsive.