Solved

JNLP is driving me crazy, please help

Posted on 2004-10-19
3
383 Views
Last Modified: 2010-08-05
I am running some tests on JNLP and have created this very small class:

package itccms;
public class fulford {
  public static void main(String[] args) {
  }
}

I know it does nothing but I am just testing my setup.

I created the JNLP file as follows:

<? header ("Content-Type: application/x-java-jnlp-file"); ?>
<jnlp codebase="http://localhost/itccms/" href="itccms.jnlp">
      <information>
            <title>ITCCMS UK IT Department</title>
            <vendor>Test Vendor</vendor>
            <homepage href="http://localhost/itccms/" />
            <description kind="short">Change Control Monitor</description>
            <offline-allowed />
      </information>
      <resources>
              <j2se version="1.4+ 1.3+"/>
              <jar href="itccms.jar"/>
            </resources>
<application-desc main-class="fulford">

</application-desc>

    </jnlp>

I am using Apache running under Windows 2000
When I call my site HTTP://localhost/itccms the directory of the site is displayed and I can see the .JAR and the .JNLP in the root of this directory. When I click on the JNLP file, it starts up, but I keep getting this error:

JNLPException[category: Launch File Error : Exception: null : LaunchDesc:

<jnlp spec="1.0+" codebase="http://localhost/itccms/" href="http://localhost/itccms/itccms.jnlp">

  <information>

    <title>ITCCMS UK IT Department</title>

    <vendor>Test Vendor</vendor>

    <homepage href="http://localhost/itccms/"/>

    <description></description>

    <description kind="short">Change Control Monitor</description>

    <description kind="one-line"></description>

    <description kind="tooltip"></description>

    <offline-allowed/>

  </information>

  <resources>

    <j2se initial-heap-size="-1" max-heap-size="-1" version="1.4+ 1.3+"/>

    <jar href="http://localhost/itccms/itccms.jar" download="eager" main="false"/>

  </resources>

  <application-desc main-class="fulford"/>

</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)

Where Have I gone wrong? My can't it see the jar file (I assme that's the problem because I moved it to a sub folder and got the same error).

Any help appreciated
0
Comment
Question by:MushyPeeze
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 12354706
> <application-desc main-class="fulford">

try changing that to:

<application-desc main-class="itccms.fulford">
0
 

Author Comment

by:MushyPeeze
ID: 12354834
Arrggghhh! It could not be that easy (sure I tried that!). Obvious when you think of it!

Yep does work! (hides face in embarassement).

Cheers Objects once again you did it.
0
 
LVL 92

Expert Comment

by:objects
ID: 12354861
no worries :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
configure dependency in POM for new database 3 45
Java: The Public Class Main 4 45
swing controls 2 22
running on tomcat not jboss eap 7.0 3 30
In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

749 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