JNLP should use a specific Java version but error results
Asked Answered
F

6

6

I'm facing a problem here. I want to use a special version to run our java webstart application but just for one jnlp. ("It was tested, ... blabla we can't use a new version... blabla" by random windbag)

So I tried to configure our JNLP like this:

<resources>
    <j2se version="1.6.0_29" href="http://java.oracle.com/products/autodl/j2se"/>
    ...
</resources>

When I start this jnlp now I get following Error even if the right Java is installed:

Error: The application has requested a version of the JRE (version 1.6.0_29) that currently is not locally installed. Java Web Start is unable to automatically download and install the requested version. This JRE must be installed manually.

Update

In the JNLP File Syntax it's allowed to use a specific Java version like 1.6.0_29. I even tried it with 1.6.0_29-b11 - still the same error.

Exact product versions (implementation versions) may also be specified. by including the href attribute. For example, 1.3.1_07, 1.4.2, or 1.5.0-beta2 by Sun Microsystems, Inc. For example,

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

or

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

Edit

The given answer is not helping and not the right answer.

Fondue answered 16/4, 2012 at 13:52 Comment(5)
Also be sure to validate the JNLP using JaNeLA.Responsive
I had a similar issue recently which was due to mix between 32 & 64 bits version of JRE. Your issue is probably unrelated.Altogether
@Altogether "probably unrelated" should be 'possibly related' IMO, but good call. +1Responsive
You can automatic download and install 1.6.0_29 if you follow the steps in my edited answer.Lx
Note that Oracle removed the JRE auto-download feature from Web Start in 2013: openjdk bug 8006701. Web Start now often (but not always) silently ignores the version specification.Trochelminth
R
3

This is quite common. Make sure that each client machine has enabled 1.6.0_29 for JNLP/Webstart.

Installing 1.6.0_29 is not necessarily enough to tell webstart that it's available. See this post for more information

Webstart settings

Roswald answered 20/4, 2012 at 11:14 Comment(1)
Nope, that's not the solution. That works for wildcard version like 1.5*.Fondue
C
3

I had installed Java 1.6.0_21 and it was enabled at the Java Control Panel. However I got the same error message that it's stated in the question: "The application has requested a version of the JRE (version 1.6.0_29) that currently is not locally installed"

I got this message even if I tried with different lines in the JNLP, such as:

<j2se version="1.6.0_29"/>

or

<j2se version="1.6.0_29-b06"/>

I solved this by editing the JNLP file with the following line:

<j2se version="1.6"/>

So the documentation line "Exact product versions (implementation versions) may also be specified" seems to be false.

Coupe answered 16/1, 2013 at 9:43 Comment(1)
I don't think you have resolved your problem because you already using 1.6.0_21 and by referring 1.6 you jws application was using 1.6.0_21 which was manually installed by you.Epicure
L
1

Auto-download of Software from java.sun.com

Try this url

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

if there are higher versions installed on the client machine the newest will used.

or

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

then you will be prompt to install exactly 1.6.0_05.

when calling ?.jnlp versions 1.6.0_05 will be used.

be careful; above only works right when there's also i higher version installed then as example 1.6.0_29 runs 1.6.0_05 as a child.

In the Java Console you will see:

JavaPlug-in 1.6.0_31
Using JRE-Version 1.6.0_05 Java Hot Spot(TM) Client VM

If you really want to download a version not listed in the "The packages currently available for auto-download " then you can download the specified version 1.6.0_29 only if you have a greater version then 1.6.0_29 (maybe 1.6.0_31) as plugin enabled in the client browser. TEST install 1.6.0_31 and look if as Example: Firefox plugins 1.6.0_31 is there and enabled. Then the client will be able to automatic download and install 1.6.0_29 via *.jnlp.

Call your Application in a client browser. A warning appears : "Install a lower Version 1.6.0_29" and a "certificate warning" click yes. install 1.6.0_29 starts.

After Download the Browser restarts and the plugin 1.6.0_31 is gone!!! Therefore the Browser redirects to the Oracle download-side there you have to install the 1.6.0_31 again. Download starts to a folder you specified . Run the file "jxpinstall.exe" that starts the update; prompt to question install again ; yes (all browser must be closed) Install starts; Look at extras, plugins and there the 1.6.0_31 plugin is back again. Now you can use your *.jnlp application with 1.6.0_29. Really much work :-)

NOTE: You will not be able to install the browser plugin again with a file like "jdk-6u31-windows-i586.exe" You must follow the steps above. You will get a file "jxpinstall.exe" that is the right one.


The java.sun.com auto-download feature simplifies Java Web Start deployments because it makes commonly used software readily available for use with Java Web Start. Typically, only an extra line has to be added to a JNLP file to take advantage of this feature. ...

The packages currently available for auto-download are:

Java 2 Runtime Environment 1.3.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
.....
Java 2 Runtime Environment 1.4.2_16 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.5.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
.....    
Java Runtime Environment 1.5.0_14 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0_04 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0_05 for Windows/i586, Linux/i586, and Solaris/SPARC

available packages look here

Lx answered 16/4, 2012 at 13:52 Comment(2)
I will try it at work tomorrow — but if it really uses the current/highest version than this is not what I need. It should use the specific version which I have defined in the jnlp file.Fondue
be careful; above only works right when there's also i higher version installed then as example 1.6.0_29 runs 1.6.0_05 as a child.Lx
S
1

Troubleshoot:

  • Check the the version currently assigned to your project build path of your IDE
  • Make sure the version specified in j2se version="1.6.0_29" is installed on client machine.
  • Check your machine to see if you do not currently have any other versions currently installed which might cause dependency conflict.
  • Check your classpath setting to see the version currently set by default. Could this be the right version?

Also note that:

The j2se element specifies what Java 2 SE Runtime Environment (JRE) versions an application is supported on, as well as standard parameters to the Java Virtual Machine.

Therefore if you are looking to release the application to some specific versions, all the versions supported should be listed. Example:

   <j2se version="1.3" initial-heap-size="64m"/>
   <j2se version="1.4+"/>

In your case you've specifed the href attribute forcing Java Web Start not to consider an installed non-FCS (i.e., milestone) JRE as a match.

By convention a non-FCS (milestone) JRE if there is a dash (-) in the version string. And so would not consider an installed 1.4.1-ea or 1.4.2-beta JRE as a match for the request.

Edited.

Solatium answered 26/4, 2012 at 12:20 Comment(8)
you wrote:"Make sure the version specified in j2se version="1.6.0_29" is installed. ??? If you tell your customer to download and install manually then there's no need to download the same version automatic.Lx
See edited. If you specify j2se version then the client is suppose to have one of the versions specified on his/her machine, else will result in the error as reported.Solatium
that is not true. The Error is a result while trying to point to a download version that is not available at "java.sun.com/products/autodl/j2se"Lx
No that is not correct, using href attribute forces Java Web Start not to consider an installed non-FCS (i.e., milestone) JRE as a match. It does not point to a download version.Solatium
Look at the Error: "Error: The application has requested a version of the JRE (version 1.6.0_29) that currently is not locally installed. Java Web Start is unable to automatically download and install the requested version. This JRE must be installed. manually." It means "not locally on the server download side".otherwise that make no sense. To down load a version make only sense when there is no such version on the user side.Lx
I see where the confusion is, I used deployed instead of client. I have edited itSolatium
you wrote :"In your case you've specifed the href attribute forcing Java Web Start not to consider an installed non-FCS (i.e., milestone) JRE as a match." THAT IS NOT THE ERROR.The Error: ....Java Web Start is unable to automatically download and install the requested version!!!Lx
There's no guarantee Web Start will download and install the version specified. Installation needs to be done manually.Solatium
N
1

Do you use :

jnlp spec="1.0+"

If so you should try with :

jnlp spec="6.0+"

I found this link, maybe there is something wrong in the configuration of your browser/JRE, or are you under a proxy?

Nozicka answered 26/4, 2012 at 13:23 Comment(2)
Ok ty I see, I drop this part. I think the OP problem is in configuration of the browser or JRE, take a look at the given link, it's the solution that give IBM. It's about IBM Systems Director but maybe it can give ideas :)Nozicka
In the link given above: That belongs to---"If the More Information window displays the following error message, the problem is caused by the JRE settings not allowing temporary Internet files to be saved on the computer. Cache must be enabled for nativelib or installer-desc support."Lx
A
1

Its the damn java version, use of the lower versions fixes the issue. I used Java 1.8.0_05-b13 Java HotSpot(TM) 64-Bit Server VM and it went through successfully.

Albumose answered 2/2, 2016 at 19:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.