JNLP should use a specific version of Java, but error results

I ran into a problem here. I want to use a special version to run our Java WebStart application, but only for one jnlp. ("It was tested ... blabla we can not use the new version ... blabla" random block of wind)

So, I tried to configure our JNLP as follows:

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

When I run this jnlp, now I get the following error, even if the correct Java is installed:

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

Update

The JNLP file syntax allows you to use a specific version of Java, for example 1.6.0_29 . I even tried it with 1.6.0_29-b11 - still the same errors.

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

<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

This answer does not help, not the correct answer.

+6
source share
6 answers

This is pretty common. Ensure that each client computer has enabled 1.6.0_29 for JNLP / Webstart.

Setting 1.6.0_29 is not necessarily enough to tell webstart that it is available. See this post for more info.

Webstart settings

+4
source

I installed Java 1.6.0_21 and it was enabled in the Java control panel. However, I received the same error message that was indicated in the question: "The application requested a version of JRE (version 1.6.0_29) that is not currently locally installed"

I received this message even if I tried to use different lines in JNLP, for example:

 <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"/> 

Thus, the documentation line "Exact Product Versions (Implementation Versions)" may also be indicated, as if this were not true.

+3
source

Automatic software download from java.sun.com

Try this URL

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

if higher versions are installed on the client machine, the latest version will be used.

or

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

then you will be asked to set exactly 1.6.0_05.

when calling? .jnlp version 1.6.0_05.

be careful; the above only works when a higher version is also installed, while the example 1.6.0_29 starts 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 that is not listed in the "Currently available packages for automatic downloads" section, you can download the specified version 1.6.0_29 only if you have a higher version than 1.6.0_29 (possibly 1.6. 0_31) because the plugin is enabled in the clientโ€™s browser. TEST install 1.6.0_31 and look, as in the example: Firefox plugins 1.6.0_31 is and is enabled. Then the client will be able to automatically download and install 1.6.0_29 through * .jnlp.

Call your application in the client browser. A warning appears: "Install the lower version 1.6.0_29" and "certificate warning" click "Yes." set 1.6.0_29.

After loading the browser it will reboot and the plugin 1.6.0_31 is gone !!! Therefore, the browser is redirected to the download side of Oracle, you need to set 1.6.0_31 again. Download starts from the folder you specify. Run the file "jxpinstall.exe", which starts the update; ask again to ask a question; yes (all browsers should be closed); Look at the add-ons, plugins and there the plugin 1.6.0_31 is back. Now you can use your * .jnlp application with 1.6.0_29. Really a lot of work :-)

NOTE. . You will not be able to install the browser plug-in again with a file like "jdk-6u31-windows-i586.exe". You must follow the instructions above. You will get the file "jxpinstall.exe", which is the correct one.


The automatic download feature of java.sun.com simplifies the deployment of Java Web Start, as it makes public software easily available for use with Java Web Start. Generally, only an extra line should be added to the JNLP file to take advantage of this feature ....

Packages currently available for automatic download:

 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 see here

+1
source

Troubleshooting:

  • Check out the version currently assigned to create your IDE.
  • Verify that the version specified in j2se version="1.6.0_29" is installed on the client machine.
  • Check your computer to make sure that you do not currently have other installed versions that may cause a dependency conflict.
  • Check the class settings to see the default version. Could this be the correct version?

Also note:

The j2se element indicates that the Java 2 SE Runtime Environment (JRE) versions are supported by applications, as well as the standard parameters of the Java virtual machine.

Therefore, if you want to release the application for some specific versions, all listed versions must be listed. Example:

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

In your case, you specified the href attribute, which causes Java Web Start not to consider the installed non-FCS (i.e., milestone) JRE as a match.

By agreement, a non-FCS (milestone) JRE if there is a dash (-) in the version string. And therefore, it will not take into account the installed 1.4.1-ea or 1.4.2-beta JRE as a match for the request.

Ed.

+1
source

Do you use:

 jnlp spec="1.0+" 

If so, you should try:

 jnlp spec="6.0+" 

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

+1
source

Its a damn version of java, using lower versions fixes the problem. I used Java 1.8.0_05-b13 Java HotSpot (TM) 64-bit server VM and passed successfully.

+1
source

Source: https://habr.com/ru/post/913325/


All Articles