I have created a executable jar of a Java program and I want to access it via my Servlet on the same machine or it can be on the other. How can I do so?
I found many solutions of calling Servlet by Java program using networking/TCP… but I am searching for Servlet to call function of Java program.
Calling a function of JavaProg means spawning another JVM process which is very expensive.
Why don’t you just put this jar (you wrote you’re creating this program, so you know how its built) into your web application and make your serlvet just call appropriate classes?
Is is a viable option at all?