Cannot run offline unless launched from Cache Viewer

I have included the <offline-allowed/> tag in my jnlp file. And I can successfully launch the application offline if I do so from the Cache Viewer.

However, if I am offline and I try to launch the application from the desktop icon (which admittedly was created with online="true" because I want the update facility when online), it fails with the following message:

com.sun.deploy.net.FailedDownloadException: Unable to load resource: ...names my jar file

My understanding is that after a timeout period (default 60 seconds?), the application should launch offline. Am I wrong? What am I missing?

BTW This is using Java 6 Release Candidate.

Thanks,

-Paul

[704 byte] By [PaulDBrowna] at [2007-10-3 9:56:57]
# 1

This was actually a bug in 1.5 that was fixed in 1.6. In 1.5, it was possible to create a link to an online only application, and then launch it even if you were offline. I may be wrong, but it was my understanding that even if you don't have the online="true" attribute set, JWS should still check to see if a newer version of the application is available. All the online="true" tag tells JWS is not to run the application if it cannot establish a connection back to the origional server.

Orcleva at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 2

Hi Orclev,

Many thanks for your reply. I may be wrong but my understanding was that it did not matter if you included the online=true attribute in the shortcut tag because this is the default anyway.

The application should still start even if offline so long as the offline allowed tag is included in the jnlp.

I have since tried my application on another computer that only has 1.5 installed and it behaves well, exactly as I would expect.

Therefore, unless backward compatability has been sacrificed in the move to Java 6 (which I doubt), I am led to conclude that this is a bug in Java 6.

Thanks,

-Paul

PaulDBrowna at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 3

tested with 6.0 b104 and the following jnlp file, i can launch from the application shortcut even if machine is disconnected from the network.

(i create the shortcut after first start using cache viewer, which is just an online shortcut)

<jnlp spec="0.2 1.0"

codebase="http://foo.com/draw"

href="draw_offlineShortcut.jnlp">

<information>

<title>Draw offline</title>

<vendor>Sun</vendor>

<homepage href="http://java.sun.com/products/javawebstart/demos.html"/>

<description>A minimalist drawing application along the lines of Illustrat

or</description>

<description kind="short">Draw Demo Short Description</description>

<offline-allowed/>

</information>

<resources>

<j2se version="1.4+" href="http://java.sun.com/products/autodl/j2se"/>

<jar href="draw.jar" main="true" download="eager"/>

</resources>

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

</jnlp>

can you please provide more information on how to reproduce your problem ?

funchunga at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 4

I tried the Draw program - that worked for me too.

Please try my program at:

http://www.dakinewave.com/buddy/download.htm

You'll be able to see the JNLP there.

I wonder if it's because of my use of the Java3D library. Does the fact that they only specify a codebase and not a href in the jnlp tag mean that this isn't cached locally? I thought I'd read something like that somewhere.

That said, I can run the application offline if I launch it from the Cache Viewer.

Thanks for your interest.

-Paul

PaulDBrowna at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 5
you are right, it's a bug in jdk 6:6494357: Cannot run offline from desktop icon even with offline allowed tag included
funchunga at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 6
A showstopper?Surely this has to be fixed before the release?It's a regression aswell because it all works fine in 1.5.Anyway, many thanks for investigating it funchung.Best wishes,-Paul
PaulDBrowna at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...
# 7
This is a very serious bug.Please vote and put pressure on fixing it before Java 6 is released. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6494357Thank you,-Paul
PaulDBrowna at 2007-7-15 5:15:05 > top of Java-index,Desktop,Deploying...