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.
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
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.
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?
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.
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
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.
Related
is there any chance to start a jnlp with jre 7_17 while jre 7_45 is the latest version installed on the system?
First i tried it by editing the jnlp file itself and changing the version from 1.5+ to 1.7.0_17. But this wasnt working. After some research, this could be a bug.
Then i tried to start the jnlp file by commandline and the javaws.exe from the bin path of the older jre version. But still the newer one is used.
Are there any chances to have many jres installed and open the different webstart apps with the version which is supported by the supplier ?
thanx
Marcus
You may not start the jnlp file itself with a specific java version - the one installed (and default in the webbrowser) is used to start the jnlp. However you can specify with which java version your application/applet is started afterwards. Here is a description:
"The version attribute refers, by default, to a platform version (specification version) of the Java(TM) Platform Standard Edition. Currently defined platform versions are 1.2, 1.3, 1.4, 1.5 and 1.6. (A platform version will not normally contain a micro version number; e.g., 1.4.2.)
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"
...
You may also use < java ...> instead of < j2se ...>
Furthermore if you have an jnlp based application it should work to manually specify the (full) path to your older java.
I have been learning about Java web start and got interested in its features. But can my Java app downloaded and run from browser run on a device without a JRE(Java environment) installed?
I have tried download a sample jar from browser with Java web start but my app can't run.
Second question: Is there a feature in Java web start to check for an installed JRE and automatically setup the environment?
a JRE is required on the client to run your java Web Start application as it is downloaded and executed localy and all Java applications need an installed JRE.
Java Web Start provides the option to declare a JRE (with version number) and download it if it is not installed. (But I never used it so I can't tell you how to set this up) found on wikipedia.
You cannot do such a things with applet/jnlp, but you can package your jar into an application package: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm
Java Webstart (JavaWS) is part of the Java Runtime Environment (JRE)
http://www.java.com/en/download/faq/java_webstart.xml
An installed JRE is - as far as I know - required to run JavaWS applications.
I'm not aware of any method which would facilitate an automatic download/install of the current JRE.
However, JavaWS allows you to enforce the use of a specific JRE version.
If "setup" refers to checking if a runtime is installed - that feature cannot of course be part of the Java runtime - that would turn it into a chicken-egg type of situation. At best an existing runtime will be able to detect that it is outdated.
But Oracle provides the Java Deployment Toolkit which is based on javascript:
http://www.java.com/en/download/faq/deployment_toolkit.xml
http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
JavaFX 2 provides ant tasks to automate those things away:
http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm#BABJHEJA
I am using Ubuntu operating system with Java version 1.7.0_15 (Iced Tea). I am unable to access the Java web start application. Every time I start it I get message that Java web start requesting JRE 1.7 and then says that it is unable to install so manually install and then it failed to install the JRE. I do not know what to do.
Here is my java version
Here is few important information
1. I have validated JNLP file using JaNeLa and there is no error.
2. Ubuntu is opening Application with JRE 1.6 perfectly fine.
3. On Windows every version is running perfectly fine.
4. I have tried with deployment tool kit but the always redirect me to the Sun page to download the linux version of JRE and even after installing that it again redirect me to the download page.
Please let me know if I can provide more information.
So finally after working whole day I have found the problem with my system. I am not sure why my question got -3 but it was valid question. The problem was with the Java plugin in the Firefox browser. Although I have installed jdk 7 on my machine but the firefox plugin was still pointing to the jre6 so giving error. So I have to manually create the link for the jre 7 in my machine
ln -s /usr/lib/jvm/<<location of jre 7>>/jre/lib/i386/libnpjp2.so ~/.mozzilla/plugins
Then I restarted the browser and make sure that I have the latest plugin and it started working, So it was not the java installed but it was firefox plugin.
Just FYI, oracle has stopped it support for java plugin for linux due to some licensing so you have to install it manually. Thanks
You can check the installed plug-in by typing 'about:plugins' in your address bar of firefox
IMHO OpenJDK 7 is not a JRE 7.
You may uninstall it before install oracle jre. Otherwise you have to use sudo update-alternatives to define the default java version
See https://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6
My Java applet only supports 1.4 java run time(1). I am having one machine on which both Java 1.4 and 1.6 environment is installed. Is there some setting available by which I can make sure my applet will always use Java 1.4 run time when it runs?
We are using key event class private data array bData with the help of Java reflection. The data which is there in this array JDK 1.4 and 1.6 is different in both the version.
A Java application compiled with JDK 1.4 will run on JDK 1.6.
You can compile a Java application with JDK 1.6, but compatible with JDK 1.4 by configuring the 'source level'.
Although you can choose your default JDK to be safe, but it depends on your operating system. If you are on Linux, you can choose between available Java versions using pdate-alternatives --config java command (which will modify some symlinks in the hindsight).
On Windows 7:
Control Panel -> Programs -> Java
Select 'Java' tab, and View the Java Runtime Environment settings.
Ensure that your Java 1.4 entry is selected.
There's a way to force a specific installed version to run, but if one Java plugin replaces the other there might be an issue with this. See linked question for further details.
Force Internet Explorer to use a specific Java Runtime Environment install?
Are there any issues with running the 1.4 code on 1.6? If not, you should be fine. Just avoid using anything in the classpath that changed significantly between these versions. Otherwise, look [here][1]. The codebase download thing is interesting, since it lets you download a different classpath. So, regardless of the JRE version, you could force the download of a 1.4 JRE classpath, which should ensure full compatability.
Edit: found an updated guide to using previous classpaths with newer Java versions in applets, which actually seems to work:
http://download.oracle.com/javase/tutorial/deployment/applet/deployingApplet.html
Edit 2: I actually have it working, but it appears to need to download JRE 1.4 and install it, but then it will run the applet with it automatically. However, this might be suitable for your needs.
http://www.2shared.com/file/bl3Rua2e/applet.html -- extract the archive, and then run index.html inside this. All source code is included.
I have a Java WebStart application for which I want to specify that the client use JRE 1.6.0_17 or later.
To the JNLP file I've tried adding:
<j2se version="1.6.0_17+"/>
or
<j2se version="1.6.0_17"/>
But when downloading JNLP file I'm given the message:
"The application has requested a version of the JRE(version 1.6.0_17) that is not installed"
despite the fact that:
"java -version" reports the version number on the machine as "1.6.0_17"
Changing the jnlp file to use and calling "System.getProperty("java.version")" reports the version that it is actually using to be "1.6.0_17"
Looking through the spec section 4.6.1 indicates that there is some difference between platform version and product version, but it isn't clear to me how I would go about using the product version (or even if I should).
Any help or pointers would be appreciated.
When you specify an exact product version, you have to specify the href attribute too.
Otherwise you can only specify the platform version (i.e. 1.5, 1.6).
Using the following should work:
<j2se version="1.6.0_17" href="http://java.sun.com/products/autodl/j2se"/>