Java Web Start cache

This isn't really a developers question but rather a desktop support question - however I can't find any forum to post it on. I have 2 questions:

1. The cache for version 1.0.1 is %programfiles%\java web start\javaws\cache - however I can't find any registry entry or .inf file to change the location of this. Our user's have read only access to everything in Program Files through active directory (I don't know who'se idea this was but it hasn't worked out very well !!). So I'd like to change it to somewhere else

2. Second questio - is it possible for user's to "share" a cache? We use Java Web Start for online applications - is there any way I could point the cache to a shared drive and that user's would all use the same cache? That way the cache only needs to be downloaded once and I can better control user access.

Thanks for any help you can provide.

[897 byte] By [y2ka] at [2007-10-2 4:01:10]
# 1

Unfortunately, if your environment or application require you to use JavaWS 1.0.1, then I don't have an answer for you. However, if you can switch to JRE 1.5.0+ then there is help. (Note: Since Java 1.4.2, JavaWS is no longer a separate install; instead it is included with the JRE.)

Java 5.0 supports several features that can help you. First of all, there is a method for installing the JRE across Active Directory. I'm not actually familiar with this install method, but I came across it while searching for answers to your questions, and I thought it might help. The instructions can be found at:

http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/install-msi.html

JavaWS now supports both a user cache and a system cache. You can specify the location of either cache by changing the Deployment properties. Both user and system Deployment properties are described on the following webpage (search for cachedir).

http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html

Using the above, you should be able to setup a system cache to share applications among users. You may choose to do this in several ways:

A) If you want to share JNLP applications only among users on the same machine, you can set the system cache to a local directory as long as all the users will have read access.

B) If you want to share JNLP applications to many users on many systems, you can set the system cache to a network resource (for example a mapped network drive). Again, all users must have read access.

Once you have setup the system cache, the easiest way to load it with applications is from the command line. This must be done by a user with write access to the system cache location. The command you want to use is:

javaws -import -system <url>

More information on JavaWS command line arguments can be found here:

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/javaws.html

Mike.

MikeR@Suna at 2007-7-15 23:23:26 > top of Java-index,Desktop,Deploying...
# 2

Mike,

Thanks so much for the reply - you've really given me alot of info there. Yea, at the moment we're using 1.0.1 but the online application that requires Java Web Start will soon require JWS 1.4.2 to be installed. My plan is to deploy this using Active Directory like you suggested, but I wanted to confirm about sharing the cache first.

However in the meantime I'd like to change the cache for 1.0.1 so that users can download updates to the application. But if I can't I guess I'll just have to work around it for now !!

Would you mind explaining what the difference is between system cache and user cache? Do the downloaded applications go into user cache? what goes into system cache?

Thanks again for your post - you've been a big help

y2ka at 2007-7-15 23:23:26 > top of Java-index,Desktop,Deploying...
# 3

If you are already planning to upgrade, I really recommend going straight to 5.0. There are a lot of Deployment features added in that release.

The difference between system cache and user cache is who/where JNLP apps are installed. Apps can only be installed/removed in the system cache by an Administrator. Also, the mechanism for setting the system cache is designed so that Administrators can prevent users from changing it. This is really nice in enterprise situations where you want all employees with the same role to run the same application from a single shared resource.

The user cache belongs to the user. When you use only the user cache, if you have multiple users sharing a single machine and each uses the same app, then each user needs to install that app. This means multiple copies of the same file, and can also allow users to run different version of the app.

Mike.

P.S.

The property for the cache on 1.0.1 is 'javaws.cfg.cache.dir'. But you really should switch to a new version, since 1.0.1 is an EOL'ed product.

MikeR@Suna at 2007-7-15 23:23:26 > top of Java-index,Desktop,Deploying...