1 Reply Latest reply: Mar 3, 2010 6:12 AM by 793415 RSS

    Unable to launch application.

    843802
      Dear Frnds,
      I am new to java webstart coding.while i am running my code in mymachine i am getting error page as "unable to launch application"
      in exceptions page it is giving as "MissingFieldException[ The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)] "
      Most importantly i m using linux machine.
      i am pasting the below.

      <?xml version="1.0" encoding="utf-8"?>
      <!-- JNLP File for My Own Jar file-->
      <jnlp spec="1.0+"
      codebase="http://172.20.1.84:8080/as/" (*here that is my system ip address and /as is context path*.)
      href="test_command.jnlp">
      <information>
      <title>Testing application</title>
      <vendor>The Java(tm) Tutorial: Sun Microsystems, Inc.</vendor>
      <description>application Demo</description>
      <homepage href="http://172.20.1.84:8080/">
      <description kind="short"> to test my own application</description>
      <offline-allowed/>
      </information>
      <resources>
      <jar href="Commmand.jar"/>
      <j2se version="1.6+"
      href="http://java.sun.com/products/autodl/j2se"/>
      </resources>
      <application-desc main-class="CommandExecute"/>
      <applet-desc main-class="CommandExecute"/>
      </jnlp>

      please help me in this aspect

      Thanks & Regards,
      Kishor gupta.
        • 1. Re: Unable to launch application.
          793415
          gupta532 wrote:
          Dear Frnds,
          My friends take care to [write well|http://catb.org/~esr/faqs/smart-questions.html#writewell].
          I am new to java webstart coding.while i am running my code in mymachine i am getting error page as "unable to launch application"
          in exceptions page it is giving as "MissingFieldException[ The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)] "
          Most importantly i m using linux machine.
          i am pasting the below.
          Have you ever heard of GI/GO? This file is the GI part of that equation.
          <?xml version="1.0" encoding="utf-8"?>
          <!-- JNLP File for My Own Jar file-->
          <jnlp spec="1.0+"
                  codebase="http://172.20.1.84:8080/as/"  
                  href="test_command.jnlp">
             <information>
                  <title>Testing application</title>
                  <vendor>The Java(tm) Tutorial: Sun Microsystems, Inc.</vendor>
                  <description>application  Demo</description>
                  <homepage href="http://172.20.1.84:8080/">
                  <description kind="short"> to test my own application</description>
                  <offline-allowed/>
              </information>
             <resources>
                  <jar href="Commmand.jar"/>
                  <j2se version="1.6+"
                        href="http://java.sun.com/products/autodl/j2se"/>
             </resources>
             <application-desc main-class="CommandExecute"/>
             <applet-desc main-class="CommandExecute"/>
          </jnlp>
          As an aside, when posting code, code snippets, HTML/XML/JNLP or input/output, please use the code tags. The code tags help protect the indentation and formatting of the sample. To use the code tags, select the sample and click the code button.
          ----------------
          Now, onto the crux of the problems.
          1) That is malformed XML. I offer the [XML Well formedness checker|http://pscode.org/xml/xmltools.html#xmlwfc] for checking for malformed XML.
          2) Even after you fix that, the JNLP is invalid. I offer [YAX-V|http://pscode.org/xml/xmltools.html#yaxv] & JaNeLA to check JNLP against an XSD. YAX-V only does validation, while JaNeLA does validation as well as other checks. Always validate your JNLP file. I am not entirely sure the XSD will point out one error I noticed, that the JNLP file includes both an application-desc & an applet-desc, but validate it anyway. There are other problems with the launch file that validation will detect.