Cryptic jar file names downloaded by Java Webstart in JRE 1.6

We have encountered a few problems in Java Webstart with JRE 1.6

In JRE 1.5, the jar files are getting downloaded onto the client

machine with it's original names.

Example :

Server File Name : acm.jar

Client File Name : RMacm.jar

But in JRE 1.6, the jar files are getting downloaded with improper file names.

Example :

Server File Name : acm.jar

Client File Name : 4fb074cc-66fc7407

Moreover the path itself seems to be invalid.

Example Path :

JRE 1.5 path:

C:\Documents and Settings\Administrator\Application

Data\Sun\Java\Deployment\cache\javaws\https\D17.16.23.11\P443\DMtest\DMwebStart

JRE 1.6 path:

C:\Documents and Settings\Administrator\Application

Data\Sun\Java\Deployment\cache\6.0\12

Due to this, we are facing Classpath problems.

What changes do we have to make to the code, for Java

Webstart to work ?

We are using JBoss 4.0.4 and JDK 1.5 in the Server

On the client machine, we have IE 6 and JRE 1.6.01

Your help would be appreciated.

[1093 byte] By [ASandesha] at [2007-11-27 3:02:08]
# 1

This has been discussed a lot recently, but

to cut to the chase, an amalgam of recent

relevant comments (mine and Andy's).

Re the cache..

"'No' code should need to rely on knowing the

application path, and Sun states that we cannot

rely on the cache location."

Andy commented..

"If you get the URL of a cached resource, and then

open a connection to that URL, you can access the

contents with getInputStream. Under the covers,

Java 6 will not actually re-download it, but instead

read the contents from the cache. The same code

will work fine with earlier versions of Java Web Start

because the URL will be a file URL to the cache, and

so getInputStream will just be reading the file."

Class.getResource("the/path/to/the/resource");

..pops to mind for this.

And if archives need to be in specific locations..

"Use the JLNP installer element to launch a class that

puts the jar's in a known place, such as a subdirectory

of "user.home". "

AndrewThompson64a at 2007-7-12 3:44:41 > top of Java-index,Desktop,Deploying...
# 2
Could you please tell me, why Java Webstart in JRE 1.6 downloads jars files with cryptic file names.And what could be the reason for changing the download path.Cause this would require considerable changes to our code.
ASandesha at 2007-7-12 3:44:41 > top of Java-index,Desktop,Deploying...
# 3
You should not rely on the download path as mentioned before. The JNLP classloader will take care of resolving anything on the classpath. What kind of classpath issues are you experiencing?
riema at 2007-7-12 3:44:41 > top of Java-index,Desktop,Deploying...
# 4

The main reason for reformatting the cache, was the merger of the cache implementations in Java Web Start and Java Plug-in. There is now one cache, and one implementation of downloading and caching code for the two products.

The format and implementation is more similar to what was the previous plugin format, as that was faster and contained more features (cache size limit, ability to run w/o caching all together, and respecting more cache control and http header directives than the webstart implementation.)

The requirement for an undeterminable filename was from the security group. A bug in older versions of IE allowed you to execute a file on the local filesystem that you knew of. ( a jar file is a form of an executable. )

We feel that the cache is only that, a private cache for the java products.

By making this change we recognize that code such as this that assumes it knows the cache's format and contents can no longer work unmodified, and that this will prevent code from being developed that does this in the future.

There are several reasons why code has done this (including some in the JDIC project), but we think there are better mechanisms for achieving the objectives of such code, and are ready to help with what we understand may be a difficult transition for some.

/Andy

dietz333a at 2007-7-12 3:44:41 > top of Java-index,Desktop,Deploying...
# 5

Well ASandesh because then you wouldn't get errors like this:

CouldNotLoadArgumentException[ Could not load file/URL specified: C:\Documents and Settings\mylogin\ApplicationData\Sun\Java\Deployment\cache\6.0\39\23e9ac67-6346a536

How valiant of the security team at sun. If I "jar -tf" any of these cryptic files I can see they are just normal jars with super-safe-secure "make debugging impossible" names.

javaunixsolarisa at 2007-7-12 3:44:42 > top of Java-index,Desktop,Deploying...