4 Replies Latest reply on Jan 29, 2004 4:29 PM by 807582

    Stand-alone

    807582
      hi all,

      i,m beggining to learn java programing at school, my teacher ask the solution for execute and stand-alone application from a website, if some one can help me

      tnx
        • 1. Re: Stand-alone
          800387
          The web application will to run in some kind of a container (JSP, Servlet, EJB, etc.), assuming you are talking about a "100% java solution". You can execute another program (either Java or another language) with Runtime.exec(uri, args[]). However, you really normally can only use the other program to query its exit code and associated input and output streams.

          I'm not sure if this is what you are asking, namely to have the web server run an external application.

          - Saish

          "My karma ran over your dogma." - Anon
          • 2. Re: Stand-alone
            807582
            first tnx,

            i only want to execute the helloworld.class in the form stand-alone live when you run java helloword at the command line..
            • 3. Re: Stand-alone
              800387
              Now I begin to understand. If you want to write one class that acts as both a web app and an application, have it implement the servlet specification and add a main() method. The main() method will allow it to run as an application. And since it implements the servlet specification, it can also be run as a web application.

              - Saish

              "My karma ran over your dogma." - Anon
              • 4. Re: Stand-alone
                807582
                ...