Discussions

General J2EE: J2EE application call stand alone application

  1. J2EE application call stand alone application (3 messages)

    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
  2. 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.
  3. Thank you.
    If I use java.lang.Runtime.exec() ,where is the best place to put this code,jsp or ejb?
  4. 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.