[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Issue with jnlp

Posted on 2006-04-27
5
Medium Priority
?
985 Views
Last Modified: 2013-11-23
Below is the jnlp code that i have in the jnlp file:

<?xml version="1.0" enconding="utf-8"?>
<jnlp spec="1.0"
            codebase="myurl"
                    href="path to jnlp on web server">
      <information>
            <title>Some Title</title>
            <homepage href="homepage url"/>
            <vendor>Vendor name</vendor>
            <description> Some Description</description>
            <offline-allowed/>
      </information>
      <resources>
            <jar href="/folder/jar1.jar"/>
            <jar href="/folder/jar2.jar"/>
            <jar href="/folder/jar3.jar"/>
            <jar href="/folder/jar4.jar"/>
            <jar href="/folder/jar5.jar"/>
      <resources>
      <security>
            <all-permissions/>
      </security>
      <application-desc main-class="My Main class"/>
</jnlp>

Some reason I'm getting this error when trying to run it:

MissingFieldException[ The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)]
      at com.sun.javaws.jnl.XMLFormat.parse(XMLFormat.java:110)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:46)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:58)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:112)
      at com.sun.javaws.Main.launchApp(Main.java:182)
      at com.sun.javaws.Main.main(Main.java:136)

but i have the <application-desc on the next to last line.

Anyone know what the problem may be? Thanks
0
Comment
Question by:tbboyett
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16554358
main-class should be a fq class name, e.g.

<application-desc main-class="edu.psu.geovista.studio.GvStudio">

..................
0
 
LVL 5

Author Comment

by:tbboyett
ID: 16554417
This is how i have it, but don't understand why it throws the error
<application-desc main-class="mypackage.mainclass">
0
 
LVL 5

Author Comment

by:tbboyett
ID: 16554530
Ok, the problem for that error was i forgot the / on the ending </resources>

but now i get another error stating No JRE version found in launch file for this system.

Do i need to somehow specify which JRE to use?
0
 
LVL 2

Accepted Solution

by:
gauravkrtomar earned 2000 total points
ID: 16554583
<resources>
    <j2se version="1.4.2"/>
    <jar href="xyz.jar"/>
</resources>
0
 
LVL 2

Expert Comment

by:gauravkrtomar
ID: 16554606
The following explains the j2se element...........

The j2se element specifies what Java 2 SE Runtime Environment (JRE) versions an application is supported on, as well as standard parameters to the Java Virtual Machine.  If several JREs can are specified, this indicates a prioritized list of the supported JREs, with the most preferred version first.  For example:

       <j2se version="1.3" initial-heap-size="64m"/>
       <j2se version="1.4+"/>

The version attribute refers, by default, to a platform (specification) version of the Java 2 platform. Currently defined platform version are 1.2, 1.3, and 1.4. (A platform version may optionally contain a micro version number; e.g., 1.4.2.)

Exact product versions (implementation versions) may also be specified—e.g., 1.3.1_01 or 1.4.2-beta by Sun Microsystems, Inc.—by including the href attribute. E.g.,

    <j2se version="1.3.1_01" href="http://java.sun.com/products/autodl/j2se"/

    or

    <j2se version="1.4.2-beta" href="http://java.sun.com/products/autodl/j2se"/>

If a platform version is specified (i.e., no href attribute is provided), Java Web Start will not consider an installed non-FCS (i.e., milestone) JRE as a match. E.g., a request of the form

    <j2se version="1.4+">

would not consider an installed 1.4.1-ea or 1.4.2-beta JRE as a match for the request. Starting with 1.3.0, a JRE from Sun Microsystems, Inc., is by convention a non-FCS (milestone) JRE if there is a dash (-) in the version string.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question