Issue with jnlp

Posted on 2006-04-27
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"
                    href="path to jnlp on web server">
            <title>Some Title</title>
            <homepage href="homepage url"/>
            <vendor>Vendor name</vendor>
            <description> Some Description</description>
            <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"/>
      <application-desc main-class="My Main class"/>

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(
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(
      at com.sun.javaws.Main.launchApp(
      at com.sun.javaws.Main.main(

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

Anyone know what the problem may be? Thanks
Question by:tbboyett
    LVL 86

    Expert Comment

    main-class should be a fq class name, e.g.

    <application-desc main-class="">

    LVL 5

    Author Comment

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

    Author Comment

    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?
    LVL 2

    Accepted Solution

        <j2se version="1.4.2"/>
        <jar href="xyz.jar"/>
    LVL 2

    Expert Comment

    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=""/


        <j2se version="1.4.2-beta" href=""/>

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This video teaches viewers about errors in exception handling.

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now