Java Web Start - Can't load applications!

S

Sasu

I've been around all the groups and FAQ's trying to find what i'm
doing wrong. This is my last chance.

I'm a beginner with Java Web Start. I've followed all tutorials i've
found without understanding it!

Here's my problem!

I have an application called Animate.java
I compile, put in Animate.jar archive together with a manifest file.
So far so good. The application starts when i run the jar.

So, i put the Animate.jar on my webserver [Slackware 10.0 / Apache
2.0]http://www.mywebserver.com/japps/Animate.jar

I add "AddType application/x-java-jnlp-file .jnlp" in my httpd.conf
and restart the server.

I create the following Animate.jnpl file and put in the same directory
as my .jar file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0"
codebase="http://digger.got.volvo.net/japps"
href="Animate.jnlp">

<information>
<title>Animate Demo Application</title>
<vendor>My Websystems, Inc.</vendor>
<homepage href="index.html"/>
<description>Animate Demo Application</description>
<description kind="short">A demo of Swing.</description>
<icon href="animate.gif"/>
<offline-allowed/>
</information>

<resources>
<j2se version="1.4+"/>
<jar href="Animate.jar"/>
</resources>

<application-desc/>
</jnlp>

And finally i create the index.html with a link to the .jnlp file.


The structure is:
mywebserver/japps/index.html
mywebserver/japps/Animate.jar (With manifest file)
mywebserver/japps/Animate.jnlp

The client is running JSE 1.4.2_7

The Java Web Start Demos work fine. So i think the proxy settings are
okay.

What i'm most uncertain about is my webserver conf? Is there something
more than the "AddType application/x-java-jnlp-file .jnlp" i need to
consider?

------------------------------------------------------------------------------
The result is that Java Web Starts starts up and just as it's about do
download the application i get an error: Unable to start Demo Animate
Application.

In details (translated from swedish so not exactly the words):
------------------------------------------------------------------------------
An error occurred when the application started.

Titel: Animate Demo Application
Vendor: iCAP Websystems, Inc.
Category: Hämtningsfel

Unable to load resource: http://mywebserver/japps/Animate.jnlp

------------------------------------------------------------------------------

JNLPException[category: Hämtningsfel : Exception: java.io.IOException
: LaunchDesc: null ]

at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown
Source)

at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)

at com.sun.javaws.Launcher.downloadResources(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)

-----------------------------------------------------------------------------
java.io.IOException

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)

at com.sun.javaws.net.BasicNetworkLayer.doRequest(Unknown Source)

at com.sun.javaws.net.BasicNetworkLayer.doGetRequest(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown
Source)

at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)

at com.sun.javaws.Launcher.downloadResources(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)

Caused by: java.io.IOException: Server returned HTTP response code:
503 for URL: http://digger.got.volvo.net/japps/Animate.jnlp

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

... 10 more
 
M

Morten Alver


I'm not proficient with Web Start, so this is just a wild guess, but
shouldn't the <application-desc> tag have a main-class attribute?
Apologies if I'm missing the point entirely :)
 
A

Andrew Thompson

On Fri, 11 Feb 2005 11:09:09 +0100, Morten Alver wrote:

(Sasu)
I'm not proficient with Web Start, so this is just a wild guess, but
shouldn't the <application-desc> tag have a main-class attribute?

No. You can omit it if the Jar has a valid* manifest that
specifies the main() class.
<http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#application_desc>

(from earlier)
* And about that manifest.. Exactly how do you run the Jar?
'Double click' launch? Run from command line?
If from the command line, what is the exact command you use?
 
T

Thomas Fritsch

Sasu said:
I've been around all the groups and FAQ's trying to find what i'm
doing wrong. This is my last chance.

I'm a beginner with Java Web Start. I've followed all tutorials i've
found without understanding it!

Here's my problem!

I have an application called Animate.java
I compile, put in Animate.jar archive together with a manifest file.
So far so good. The application starts when i run the jar.

So, i put the Animate.jar on my webserver [Slackware 10.0 / Apache
2.0]http://www.mywebserver.com/japps/Animate.jar

I add "AddType application/x-java-jnlp-file .jnlp" in my httpd.conf
and restart the server.

I create the following Animate.jnpl file and put in the same directory
as my .jar file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0"
codebase="http://digger.got.volvo.net/japps"
href="Animate.jnlp">

This means: WebStart will try to load from
"http://digger.got.volvo.net/japps/Animate.jnlp". Your JNLP file really
*is* there, isn't it?
Another guess: May be the trailing "/" in codebase is missing. Try
codebase="http://digger.got.volvo.net/japps/"
<information>
<title>Animate Demo Application</title>
<vendor>My Websystems, Inc.</vendor>
<homepage href="index.html"/>
<description>Animate Demo Application</description>
<description kind="short">A demo of Swing.</description>
<icon href="animate.gif"/>
<offline-allowed/>
</information>

<resources>
<j2se version="1.4+"/>
<jar href="Animate.jar"/>
</resources>

<application-desc/>
</jnlp>
[....]
------------------------------------------------------------------------------
The result is that Java Web Starts starts up and just as it's about do
download the application i get an error: Unable to start Demo Animate
Application.

In details (translated from swedish so not exactly the words):
------------------------------------------------------------------------------
An error occurred when the application started.

Titel: Animate Demo Application
Vendor: iCAP Websystems, Inc.
Category: Hämtningsfel

Unable to load resource: http://mywebserver/japps/Animate.jnlp
For some reason WebStart tried to load the JNLP from
"http://mywebserver/japps/Animate.jnlp", contrary to what is specified
in the JNLP quoted above. Something doesn't fit here, but I don't
understand what... :-(

[....]
Caused by: java.io.IOException: Server returned HTTP response code:
503 for URL: http://digger.got.volvo.net/japps/Animate.jnlp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
[....]

Hope this helps. But may be I'm totally missing the point... :-/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top