aspose file tools*
The moose likes JNLP and Web Start and the fly likes Do jnlp file updates itself Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Do jnlp file updates itself" Watch "Do jnlp file updates itself" New topic
Author

Do jnlp file updates itself

Marjan Stojnev
Greenhorn

Joined: Mar 03, 2009
Posts: 16
Hi, I have a problem,

I have an jws application. It is deployed on web-server.
When client first time run application by running it's jnlp file, on his desktop will be created one shortcut.

If I edit jnlp on server by adding some resources(jar files) and changing codebase, can client just start app by double click on shortcut to update both NEW jnlp and new jars?



Old jnlp


changes are <jar href="NEW.JAR" /> and codebase="http://server/PRODUCTION"
new jnlp:

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Yes, I believe that is how it is supposed to work. Why do you describe your question as a "problem"?
Marjan Stojnev
Greenhorn

Joined: Mar 03, 2009
Posts: 16
Hi Paul,

I call it problem because I have a update problem with jws. Updating of jnlp file sometimes does not work like it should.

On one PC(winXP with java 1.6.23) updating of jnlp by clicking on previously installed application shortcut does not work. Old JNLP is not never changing . JNLP update is working only if I run new jnlp file. (I check jnlp state in ControlPanel/Java Control Panel/Java Cache Viewer)

On different PC(winxp with java 1.6.17) updating work fine several times, by running app by clicking shortcut, but it fails sometimes without reason. It works perfect if I run new jnlp file, too.

Updating of changed resources(jars) works fine.

Can I do something to ensure that update of JNLP will work every time I run app by clicking only installed app shortcut?
prem pillai
Ranch Hand

Joined: Nov 02, 2007
Posts: 87

Are you accessing the application through a proxy? Proxy might be doing some caching ... !!
Marjan Stojnev
Greenhorn

Joined: Mar 03, 2009
Posts: 16
prem pillai wrote:Are you accessing the application through a proxy? Proxy might be doing some caching ... !!


No, application is always downloading directly from web-server.

I tested jnlp updating process by clicking on desktop shortcut. I noticed that:
On Jre 1.6.17 update works fine,
On Jre 1.6.18 update works, but shortcut is not updated
On Jre 1.6.23, 24 update is not working.

Interesting thing is that there is error message:
"Could not launch from cache. Will try online mode. [Some of required resources are not cached.]"
when we using java On Jre 1.6.23, 24
This message is not showing when Jre 1.6.17 is used.

All testing is done on two applications - our app which have jnlp listed above, and one app downloaded from Sun site:
http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/uiswing/examples/components/index.html#HtmlDemo"



I will check all jre-s from 1.6.10 to 1.6.24 and i plan to use only jre-s which have no problems with update from shortcut.
Radu Airinei
Greenhorn

Joined: Mar 02, 2011
Posts: 2
Hi,
We identified the same problem.
Starting with 1.6 up 22, JWS will not update if JWS cache path contains any "white spaces". This problem will affect most of WindowsXP users since default JWS cache on WindowsXP is in "Documents and Settings" directory.
A workaround is to modify JWS cache from Java Control Panel.
Marjan Stojnev
Greenhorn

Joined: Mar 03, 2009
Posts: 16
Radu Airinei wrote:Hi,
We identified the same problem.
Starting with 1.6 up 22, JWS will not update if JWS cache path contains any "white spaces". This problem will affect most of WindowsXP users since default JWS cache on WindowsXP is in "Documents and Settings" directory.
A workaround is to modify JWS cache from Java Control Panel.


Hi Radu,
Thanks for this info, it is good to know. Based on this knowledge and testing, we have next report:

jws update by clicking on shortcut works fine with jre versions: (default installation cache path)
1.5.07, 1.6.10, 1.6.11, 1.6.14, 1.6.15, 1.6.16, 1.6.17, 1.6.19, 1.6.20, 1.6.21

jws update by clicking on shortcut works fine with jre versions: (cache path with no whitespace characters)
1.5.07, 1.6.10, 1.6.11, 1.6.14, 1.6.15, 1.6.16, 1.6.17, 1.6.19, 1.6.20, 1.6.21, 1.6.22, 1.6.23, 1.6.24

jws update by clicking on shortcut NOT works with jre versions:
1.6.12, 1.6.13, 1.6.18

Only jre 1.5.07, and 1.6.10 - 1.6.24 are tested.
Do you know, is there a bug report on sun site for this ?
Radu Airinei
Greenhorn

Joined: Mar 02, 2011
Posts: 2
One of my colleagues posted a bug report and we are waiting for their review.
Nick Knight
Greenhorn

Joined: Mar 25, 2011
Posts: 1
I realize this is an old thread, but it has been very helpful to me and I have something to add.
We too had problems where either JNLP files in the cache would not update automatically, or in other cases the JNLP file in the cache would update, but the desktop short created by javaws would not update causing the shortcut to be unable to find the correct JNLP file.

We had to do two things to fix this:

Add following line to JNLP File: <update check="always" policy="always"></update>
We add that between the </Information> element and the <security> element. Check the JNLP file spec if you are unsure.

Next, we moved our users cache from "Documents and Settings\username\....." because of the whitespace bug in some Java 1.6 version. We either in java control panel or in each users "deployment.properties" file move the cache to a path without whitespace like "c:\javacache". Problem solved, the JNLP and the desktop shortcut will auto update now when we update the server.

We are going to create a "deployment.config" file that point to a corporate "deployment.properties" file which sets things like whether we want java to auto update (we don't).

Thanks,
Nick
nknight62@yahoo.com

Jared Bracken
Greenhorn

Joined: May 09, 2011
Posts: 1
Radu Airinei wrote:One of my colleagues posted a bug report and we are waiting for their review.


Thank you for posting what is going on with the "white space" cache path bug. This helped us figure out why some of our test machines were not updating. Can you post a link to the bug report?
Touko Vainio-Kaila
Greenhorn

Joined: May 23, 2011
Posts: 2
Radu Airinei wrote:One of my colleagues posted a bug report and we are waiting for their review.


Any signs on bug being accepted? I also left a related bug report before I found this thread, even though I hadn't find out that the white space at the cache path would have some effect on the issue. Haven't heard anything either.
Marembo Ochieng'
Greenhorn

Joined: Sep 12, 2009
Posts: 19
I am running jre1.6 update 26.
When i deploy my application on localhost IIS server, download and install everything works fine. I am able to connect to the database (using toplink essentials)
Now when i deploy my application on the remote IIS server, I am able to download the application and it starts fine until at the point i try to connect to the database.
It simply hangs.
Tracing my logs, i found out that it hangs at the point where i try to create the entityManagerFactory.

the following is my jnlp file:



Is it possible that socket connection is being refused for the database connection?

now when i disconnect my internet connection after more than ten minutes, i get the following log trace:



on offline mode, i get the same console error logs
What can be the problem?

And

I will really appreciate any help.
Touko Vainio-Kaila
Greenhorn

Joined: May 23, 2011
Posts: 2
The bug with whitespace cache seems to be accepted now : 7063209
Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Is it possible that some popups come if the application is currently running and any changes on jar on the server side?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Do jnlp file updates itself