Can Web Start call earlier installed versions on client machine?

Can Web Start invoke earlier installed versions of the

JRE on a client machine,without invoking a download?

I ask because I have tried to so, unsuccessfully,

using the versions attribute of the j2se element.

In the usenet thread 'Jar test, with 1.4 VM?',

Usenet Message ID:

1170640609.025666.236030@s48g2000cws.googlegroups.com

http://groups.google.com/groups?selm=1170640609.025666.236030@s48g2000cws.googlegroups.com

(follow the Google link at the top, to the thread)

I was attempting to confirm that a Jar file I

was deploying, was 1.4 compatible.

The test failed, because despite that the (1)

user who attempted it had a working 1.4.2 install,

the JNLP file (which declared version='1.4'),

was prompting for a download. The user was

not prepared to do that, understandably -

that was exactly what I was trying to avoid

doing, myself.

Since then, I did further testing locally -

trying to get a 1.5 launch when my current

Java is 1.6 - I have a number of 1.5 versions.

No request for '1.5', '1.5.0_08' or '1.5*' worked

(OK - that last one was just a WAG*), every time

I was prompted for download (which also failed,

as an aside!).

What am I getting wrong?

Do I misunderstand the intent of the j2se element

finding earlier verions? Is it only versions that

were installed by web start?

Is my understanding of how to use the version

attribute, incorrect?

* Where are the detailed instructions on the

allowable forms of the version attribute?

Neither the spec. nor developers guide seem

to go into it in any detail. Some of the forms

I have seen around the forum were (AFAIR)..

<!-- Suggests 1.4 preferred? -->

version="1.4 1.5+"

<!-- Suggests 1.4 only? -->

version="1.4"

<!-- Suggests 1.4.2 preferred,if microversion

13+ is found,else 1.5+? -->

version="1.4.2_13+ 1.5+"

FWIW - here is the JNLP I am currently using

for the test, it is 'live and public'..

<?xml version='1.0' encoding='UTF-8' ?>

<!--

If you seethis message in your browser, it means the

browser is not correctly set up to handle the JNLP file

type, that launches Java applications within a secure

environment, that cannot access your computer, or data.

To get the browser (and PC) correctly set up to handle

this type of file, visit ..

http://www.java.com/

..to install the free, secure, Java Plug-In made

by Sun Microsystems.

-->

<jnlp spec='1.0'

codebase='http://www.athompson.info/family/'

href='thompson-1.4.jnlp'>

<information>

<title>Thompson Family Genealogy</title>

<vendor>Andrew Thompson</vendor>

<description kind='one-line'>

The ancestors of William Robert Ramshaw Thompson

</description>

<offline-allowed />

<shortcut online='false'>

<desktop/>

</shortcut>

</information>

<resources>

<j2se

version="1.4"

href="http://java.sun.com/products/autodl/j2se" />

<jar href='genj-applet.jar' main='true' />

</resources>

<applet-desc

main-class='genj.applet.Applet'

name='genealogy'

codebase='./index.html'

width='300'

height='170'

>

<param name='GEDCOM' value='thompson.ged' />

<param name='ZIP' value='thompson.zip' />

</applet-desc>

</jnlp>

[4530 byte] By [AndrewThompson64a] at [2007-11-26 17:27:24]
# 1

What platform are you running on ?

I don't have any problem using Java 6 Web Start with a varity of earlier java versions.

On Windows, the list of available JRE's is populated from the registry which contains pointers to all the publically installed JRE's. (It will not automatically include private JRE's , such as those installed by a JDK install, where "install public JRE" is not selected.). On unix it will only, by default, contain the JRE it came with and any installed by java web start or that came with any previous version of java web start that had previously been run.

In either case you can add existing JRE's to the list by using the "Java" tab in the Java Control Panel, using the "find" option.

/Andy

dietz333a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 2

Using your tips, I was able to find the 1.5

JRE's listed in the Java control panel

(of an XP Pro box) and see they had no

checkmark for 'enabled'.

After enabling 1.5.0_08, I was successfully

able to launch the application (OK - applet

really) using the 1.5.0_08 JRE.

Thanks.

As an aside, I had to specify '1.5.0_08'

exactly to get that JRE. This is fine for

local testing, but sometimes it is handy

to ask others to help test via the web,

and it would be nice if I could make it less

specific (e.g. '1.5', to get any installed

and enabled JRE that is a 1.5 variant)

Do I understand wrong? Should that work,

to specify '1.5' and get a '1.5.0_08' JRE that

is installed and enabled?

AndrewThompson64a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 3

Try

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

This should find any enabled JRE of version 1.5 and higher

or download the latest autodownload release from Sun.

But I dont know how to exclude JRE above a defined version.

By Schippe

Schippea at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 4

Thanks, but I actually am doing this in attempts

to invoke 1.5, when I already have 1.6.

Note that it was mostly for the (dubious)

purposes of testing of application

compatibility with earlier Java versions.

Further, I am getting the impression that

web start was very much not designed

for this peculiar and specialist purpose.

AndrewThompson64a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 5

using either:

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

or

<j2se version="1.5" />

will get you any 1.5 version available on the system.

if you use the href attribute, you are asking for the particular update release, so

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

will only work with 1.5.0_00

/Andy

dietz333a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 6
Thanks. I had not realised the subtleties ofincluding or excluding the download href.I will do some more tests to try and confirmthe behaviour(s) here.
AndrewThompson64a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 7

> using either:

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

> or

> <j2se version="1.5" />

> will get you any 1.5 version available on the system.

I have just seen that work here, for both variants,

invoking up a public, enabled, 1.5 VM, when I have

1.6 installed. That resolves this thread.

Thanks to all that replied.

AndrewThompson64a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 8
Thanks Andy!Good thing to learn. But is there anything available that documents such details?Would be nice to know such things beforehands and avoid "try and error".Bye Schippe
Schippea at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 9
this behavior is documented both in the specification, and in the developers guide at: http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#resources/Andy
dietz333a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 10
Ok, but the syntax 1.5* new to me and is never mentioned on this link. Or did you take the "*" just as a wildcard?Bye Schippe
Schippea at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...
# 11

> ..did you take the "*" just as a wildcard?

No. Andy was being quite literal when he quoted '1.5*'.

Here is my test JNLP for that exact string..

http://www.athompson.info/family/thompson-1.5-all.jnlp

And the console reads..

Java Web Start 1.6.0

Using JRE version 1.5.0_08 Java HotSpot(TM) Client VM

User home directory = C:\Documents and Settings\Administrator

-

...

( And no, I agree that the '*' character was

not mentioned in the document linked ;)

I might add those simple examples to

my web start example page. It is handy

for version testing.

AndrewThompson64a at 2007-7-8 23:55:21 > top of Java-index,Desktop,Deploying...