6 Replies Latest reply: Jul 23, 2012 9:57 AM by 950823 RSS

    JNLP file

    950823
      I am trying to run from a web browser a simple java application that print the Hello World message. I have the jnlp file, java class compiled, and the html file and I am getting the following error constanly.

      This is the source:

           <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+">
      <information>
      <title>Hello Wolrd!!</title>
      <vendor>VW International</vendor>
      </information>
      <resources>
      <!-- Application Resources -->
                
                <j2se version="1.6+"
                          href="http://java.sun.com/products/autodl/j2se"/>
      <jar href="HelloWorld.jar"></jar>
      </resources>
      <application-desc
      name-class="HelloWorld"
                width="300"
                height="300">
      </application-desc>
      </jnlp>

      Exception Tab : frm java web start

      </jnlp> ]
      at com.sun.javaws.LaunchDownload.getMainClassName(Unknown Source)
      at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Any help? Thank you,

      Alex
        • 1. Re: JNLP file
          EJP
          The beginning of the exception is missing.
          • 2. Re: JNLP file
            817264
            name-class="HelloWorld"
            Attibute name should be "main-class"
            See
            http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#application_desc
            • 3. Re: JNLP file
              950823
              the main-class="HelloWorld" is below the application-desc tag..
              • 4. Re: JNLP file
                gimbal2
                No it is not - there is name-class, not main-class. At least in the XML blob that was posted. Perhaps when you post it between \
                 tags it will become readable enough that you yourself see it.                                                                                                                                                                                                                                                                                                                                                                                                                
                • 5. Re: JNLP file
                  EJP
                  No it isn't. Look again.
                  • 6. Re: JNLP file
                    950823
                    Thanks it works now!