I have a J2EE web based application.there is a .exe application need to be run on server machine. how can I call this application from my J2EE application.I hope this application run at back end,the user doesn't have to wait for the application response
If all else fails, you can use java.lang.Runtime.exec() method to execute the program from the command line.
If the program has a C++ API, you might use JNI.
If the program has a .NET API, you might use web services.
If I use java.lang.Runtime.exec() ,where is the best place to put this code,jsp or ejb?
Calling java.lang.Runtime.exec() is technically a violation of the EJB spec, so you probably want to call it from your servlet/JSP layer.