I am building a web application for chemical industry. Its basically searching in database of chemical structures. A lot of cheminformatics calculations is needed and there are many open source solutions to do it written in Java.

I am currently wondering what programming language to use. I need to use some functions in Java and I dont want to write whole system in Java because I am not familiar with writing web apps in it.

So I have this idea to prepare some .jar files with needed functions and use them in PHP through command line. I wonder about scalability of this solution.

Is it fast to call .jar file in PHP for example 1000 times in one cycle?
How long the parameter passed to .jar can be? I assume large arrays converted to string as parameters.
I have doubts if this is a good idea in general and why I sould not do this?

Thank you for your ideas.