Download correct JRE before launching the jnlp application

Hi,
I have this requirement that before launching the jnlp application, the code should check the version of JRE installed on client's system, if it is less than 1.6 u10 then install the latest available JRE before launching the application.
I am using the Java Script in my jsp to achieve this objective and it is working fine with non-IE web browsers. The trouble starts when the client machine is using 1.6.0_6 jre, in that case IE is not able to download /redirect user to the sun's page for the download of latest JRE.
My java script code as follows:
<script language="JavaScript">
var launch = null;
// try to check the JRE version installed on client's machine.
//if its less than 1.6.10 redirect to Sun Micro systems website.
//and then after installation, launch Receptionst and Call Center application
function checkForInstalledJreVersionAndLaunch(appName)
     //detect browser used at client's machine
     var windowsIE = (navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1);
     if (windowsIE) {
          alert(windowsIE);
         document.write("<OBJECT codeBase=\"http://java.sun.com/update/1.6.0/jinstall-6u10-windows-i586.cab#Version=6,0,10,0\" classid=\"clsid:5852F5ED-8BF4-11D4-A245-0080C6F74284\" height=0 width=0>");
         document.write("<PARAM name=app VALUE=\"http://localhost:8080/"+appName+"/launch.jnlp\">");
          document.write("<PARAM NAME=back VALUE=true>");
          document.write("</OBJECT>");
     }else{
          if (navigator.mimeTypes && navigator.mimeTypes.length)
               if(!checkWebStartWersion())
                    window.open("http://jdl.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=java.com","needdownload");
               launch = setInterval('launchJNLP("http://localhost:8080/'+appName+'/launch.jnlp")',100);
function launchJNLP(app) {
    if (checkWebStartWersion()) {
        clearInterval(launch);
        window.location = app;
function checkWebStartWersion()
     var isMajorVersion = false;
     var isMinorVersion = false;
     navigator.plugins.refresh(true);
     if(navigator.mimeTypes['application/x-java-jnlp-file'])
          for(var i=0;i <navigator.mimeTypes.length; i++)
               var pluginType = navigator.mimeTypes.type;
               if(pluginType.indexOf("x-java-applet;jpi-version") > -1)
                    var jreVersion = pluginType.substring(pluginType.indexOf("_")+1,pluginType.length);
                    var jreUpdateNumber = parseInt(jreVersion);
                    if(jreUpdateNumber >= 10)
                         isMinorVersion = true;
               if(pluginType.indexOf("x-java-applet;version") > -1)
                    var jreVersion = pluginType.substring(pluginType.indexOf(".")+1,pluginType.length);
                    var jreUpdateNumber = parseInt(jreVersion);
                    if(jreUpdateNumber >=6)
                         isMajorVersion = true;
     return (isMajorVersion && isMinorVersion);
function launchApplication()
     checkForInstalledJreVersionAndLaunch("appname");
</script>

I hear your frustration. I am attempting to do something similar.
To me, it looks like this ActiveX control has no ability to detect a minor version of JRE. It knows if some JRE 1.6 is installed or not, but not if say JRE 1.6.0_10 or higher is installed. But, if it finds that some JRE less than 1.6 is installed such as a 1.5 version, this ActiveX control can automatically install the latest JRE 1.6.0_12. This seems to work well for me. But, the overall behavior is not consistent. It looks to me that this ActiveX control is only good for making sure that the client has some version of JRE 1.6. It doesn't care which one.
A similar issue exists if you try to use Java WebStart to automatically download the correct JRE 1.6 version.
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />As of today, this code will tell Java WebStart that it needs some version of JRE 1.6 or higher to run your app. If the client does not have it, Java WebStart will download and install 1.6.0_07. Apparently, WebStart thinks that version is a "good" one - whatever that means.
If instead you use this in your .jnlp file:
<j2se version="1.6.0_10+" href="http://java.sun.com/products/autodl/j2se" />Java WebStart will not run your application unless the client has at least 1.6.0_10 installed. However, it is not able to install this version if the client does not have at least 1.6.0_10 already installed. It isn't smart enough for that. It looks like no one at sun has gotten around to updating http://java.sun.com/products/autodl/j2se to deal with recent JREs.
Maybe I'm missing something, but WebStart deployment is more difficult than it needs to be. Sun introduces all sorts of new things into minor versions of Java, but nobody seems to be interested in making sure that the end user can have seemless upgrade experience.
And people wonder why Flash and AJAX have become so popular...
There probably is another workaround using a Java applet to determine what version is really installed before launching WebStart, but it just seems like an ugly hack to me. If an older version of Java 1.6 is detected, you could direct the user to java.sun.com in a new browser window, just as in the case of Firefox in your code. Ugly, but it would probably work.

Similar Messages

  • I attempted to download a song. It originally did not download correctly. I refreshed the download and it supposedly completed. Upon playing the song in both my library and on the Itunes store it will not play past the first 5 seconds. How can I fix this?

    It originally did not download correctly. I refreshed the download and it supposedly completed. Upon playing the song in both my library and on the Itunes store it will not play past the first 5 seconds. How can I fix this?

    Hello Whitney262,
    Thanks for using Apple Support Communities.
    I would go ahead and make sure you can first download the content, then remove the song from your iTunes Library, and download again from your iTunes past purchases.  The article below will walk you through the entire process:
    Download past purchases
    http://support.apple.com/kb/ht2519
    Take care,
    Alex H.

  • Whenever I launch the Mail application on my iPod Touch, the window opens and closes immediately. What can I do?

    Whenever I try to launch the Mail application on my iPod touch, the window opens and closes immediately. I just restarted the device, but there's an icon on the screen of a circle.

    Try a hard reset and go from there.
    Basic troubleshooting steps. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G + 120G OCZ Vertex 3 SSD Boot HD 

  • F&G Committee "F&G Committee" is not a valid e-mail address because it is not of the form user@host. You must correct it before sending the e-mail.

    With this new v.31.1.0, released: September 2, 2014 version of Thunderbird, I can no longer e-mail to a Contact List of addressees, getting the error msg: F&G Committee <"F&G Committee"> is not a valid e-mail address because it is not of the form user@host. You must correct it before sending the e-mail. In earlier versions, the individual e-mail addresses in the list (F&G Committee in this case) are automatically put in as the e-mail is sent. Is there a solution to this problem?

    Read this.
    https://support.mozilla.org/en-US/questions/1019019

  • Why my screen is blinking just before launching the form?

    Hello
    I am developing an Adobe interactive form from LiveCycle designer from Webdynpro ABAP.
    I wrote some very very simple validation Java Script at the form fields level at INITIALIZATION event, fine.
    When i am launching the form in the browser (i mean, TESTing the webdynpro application in SE80), am getting couple of BLINKING popups.......at the same time, the screen also BLINKING.........finally, the form is launching!!
    Why am getting BLINKING (popups, laptop screen) just before launcing the form on the screen/browser? Any mistakes in Java Script? When i did/click CHECK SYNTAX button, i did not see any red issues(except couple of warning).
    Thank you

    Hello Srinivas,
        Even I see this on my screen several times. This might be because of any javascript error resulted from your script.
    To see this dialog box, you should enable your javascript debugger. Open Adobe Reader,got menu, Edit -> Preferences, click the javascript tab on the left hand
    side.
    Now on the right hand side,
    In Javascript section -- check Enable Acrobat Javascript.
    In Javascript debugger section -- check the button Show console on errors and messages.
    This should help you in displaying the javascript debugger. If you still dont see the debugger,
    put some syntax errors temporarily in your form initialize event javascript, try to open the form using adobe reader.
    If it still doesn't show, Use Ctrl - J to show the debugger.
    Regards,
    kc

  • Firefox 30 will not launch the ICA Application when using Citrix receiver 4

    When trying to launch a Citrix Application with Firefox version 30 it will not launch.
    There is no error message appears.
    If, you change back to Firefox 29 all works without issues.
    How can you get the new version to work Citrix Applciations and Citrix receiver 4.1

    The fix for me was to update to the latest version of Citrix Receiver (4.1.0.56461) and then change the plugin settings for Citrix in the about:addons sections from "ask to activate" to "always activate". All working again for me now :)

  • SSO not working when launching the InfoView application

    We are so close to implementing SSO for BO Edge 3.0 using AD and Kerberos.  We can logon to InfoView and CMC using AD authenication and it works fine.  When turning on SSO:
        <context-param>
            <param-name>sso.enabled</param-name>
            <param-value>true</param-value>
        </context-param>
    in the InfoViewApp web.xml it fails with an error message in the Tomcat stdout.log
    Debug is  true storeKey false useTicketCache false useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    +          [Krb5LoginModule] user entered username: "at"MYCOMPANY.COM+
    User name is missing.
    When done through the application logon screen and able to logon it is
    Debug is  true storeKey false useTicketCache false useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    +          [Krb5LoginModule] user entered username: dennis"at"MYCOMPANY.COM+
    The username appears in the log file followed by the debug message for Kerberos key being created.
    I am so close, does anyone have an idea?

    Hi Tim,
    The Vintela SSO document for BOE XI 3.1 is very comprehensive, but it has not resolved my issue.
    Under NTLM option I SSO works great with .NET InfoView as long as I have the web site authentication set to Windows Authentication and ASP .NET Authentication enabled.  Once the ASP .NET is disabled, SSO does not work.
    When using the Kerberos option, .NET InfoView SSO does not work due to the error 'propagating the security context between the security server and the client'.
    The Java InfoView SSO does not work either, but I can enter my user credentials and logon fine.
    std.out error:
    Debug is  true storeKey false useTicketCache false useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
              [Krb5LoginModule] user entered username: @OR.PROVIDENCE.ORG
    Acquire TGT using AS Exchange
              [Krb5LoginModule] authentication failed
    Generic error (description in e-text) (60)
    No user name is being passed.  I've been through a multitude of documents and forums ensuring settings are correct and I believe they are including no duplicate SPN's.
    The only issue on the server is that I cannot open the tomcat confi app. due to it not able to start service BOE120Tomcat.  I was able to update the registry with the info for the bsclogin.config and krb5.ini.  I was not able to find anything on getting that service started.
    Any ideas?  Need more info? I have a bunch. 
    Thanks and have fun,
    Phil

  • Upon start-up of Firefox, user account control is asking for permission to modify the hard drive on my computer before launching the program...this is a new developemenent in the last few days. In the past Firefox would launch without asking this.

    user account controls dialog box comes up before Firefox.
    "Do you want to allow the following program to make changes to this computer?"
    Yes launches Firefox, No closes the dialog box.

    Check that you do not run Firefox as Administrator.<br />
    Right-click the Firefox desktop shortcut and choose "Properties".<br />
    Make sure that all items are deselected in the "Compatibility" tab of the Properties window.<br />
    * Privilege Level: "Run this program as Administrator" should not be selected<br />
    * "Run this program in compatibility mode for:" should not be selected<br />
    Also check the Properties of the firefox.exe program in the Firefox program directory.<br />

  • Java Security Error while Launching the Application through JNLP

    Hi!,
    I have a problem in launching my Application through JNLP. It is giving the Error dialog as "Unable to lauch application" with the dialog title as "Java Security Error".
    I don't know why this problem is coming but when I have reset my profile on my system & then I tried to launch the same application & I got success.
    Can anyone suggest me what was the problem?
    Pradeep Gupta

    hi,
    usually it is the web dynpro launch system that is causing the issue, OR there is a misconfiguration in the backend like the tasks are set up with com.sap/esslea in the backend and the xml file is referencing sap.com <SWITCH>/esslea and the dynpro is showing this as not deployed.
    Regards
    Sharanya Rajagopal

  • The Adobe Application Manager doesn't work, can't download trial software.

    I'm on a Mac, trying to download a trial of Acrobat Pro X, and as I hit download, it launches the Adobe Application Manager. Once it's launched, it keeps spinning the blue-gray squares round and round and nothing happens. Is there a way to directly download the file and install it manually?
    Cheers,
    Rita

    Ok, I tried and it has begun the installation.
    The first time, before I got to the end, it said 'The Adobe Application Manager is already running.'
    I was asked to quit, but there was no quit button, so I Force quitted it.
    Then I started the installation process again, and now I get this error message:
    The installation cannot proceed, because some of the processes are running.
    Do you have any idea what I'm doing wrong?
    I quit all Adobe products.
    Thanks for your attention.
    Regards,
    Rita

  • Eror downloading a XLS file on the portal hosted struts/j2EE application

    guys,
    1st of all please bare with for writing such a huge mail but to explain the scenario i had to do this.
    i am trying to download a XLS file from the web application (struts/J2EE) hosted on the portlet.
    on my portlet i have few text boxes and a button.
    onlcik of the buton there are few validation javascripts and if the valdatin is thrugh then the form is submitted.
    there are 2 ways i can submit the form to the struts action class.
    both approaches have some problem or the other.
    Apporach 1
    var postUrl = document.getElementById('getReportURL_$$PORTLET_ID$$').innerHTML;
    var post = new PTHTTPPOSTRequest(postUrl, form, handleInlinePostResponse_$$PORTLET_ID$$);
    post.invoke();
    this is like a AJAX request post where the response comes back in the function handleInlinePostResponse_$$PORTLET_ID$$ which can be then handled.
    Problems
    1. as from action class i am trying to send a XLS file, i am writing the byte stream of the XLS file on the output stream of the response. when the response reaches the function handleInlinePostResponse_$$PORTLET_ID$$ on portlet jsp it gives me an javascript exception 'End of file reached in invalid state for current encoding' but while sending the response i am encoding the byte stream.
    the code snippet from the action class is as below
    response.reset();
    response.resetBuffer();     
    response.setHeader("Content-disposition", "attachment; filename=" + reportData.getFilename());
    response.setCharacterEncoding("UTF-8");
    response.setContentType("application/vnd.ms-excel");
    response.getOutputStream().write(reportData.getContent()); //byte[] form of the XLS file
    return null; //as we write on the response out stream the response is already commited hence the return null has no significance.
    2. in case of the any exception on server side this approach is helpful as the error content jsp is rendered in to the portlet from where the action was fired.
    Approach 2
    form.action = "<pt:url xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:href='downloadCommercialXLSReport.do'/>" ;
    form.submit();
    This approach is normal for submitting any struts from bean to the struts action class (i know this is not a aprropriate way to submit d form through portlet as it submits whole page inclusding all the portlet data)
    Problems
    1. here in case of the sucess the XLS file is returned to the browser which openes a browser specific dialogue box having 'Save' 'Open' and 'Cancel' buttons to save/open the XLS file. (please note no javascript exception occurs here as approach one as the byte streeam content is returned to the browser directly and not to any post response handler function as handleInlinePostResponse_$$PORTLET_ID$$)
    2. But here the problem is in case of any sever side exception the error jsp is rendered on whole browser page and not in portlet which is kinda goofy.
    so now i am in a catch 22 scenario each approach has 1 problem either in success or in failure flow.
    can sombody suggest me a way out from this as i desperately need to download a XLS file.
    lemme kno if anybody has done a similar download stuf through portal server.
    regards,
    Sush

    i have done this before although it was in .net. try the first approach but first pop to a new window....the xls response has to be the only response to the browser or else the browser will take the other bytes returned as garbage and call the stream corrupt. let me know how this goes for you.
    if you still have problems i can post the code that worked for me. it is in c# but looks very similar.

  • This is crazy I paid for the service. logged into the site. downloaded the launcher. attempted to launch the app. and...nothing?  what the deuce!

    this is crazy I paid for the service. logged into the site. downloaded the launcher. attempted to launch the app. and...nothing?
    what the deuce!

    We are sorry for the trouble that this has caused you. Can you please suggest if you did the migration from a previous version of MAC OS to Yosemite(10.10.1)? If yes, are you having trouble while Launching the Desktop Application? If yes, there are two steps available for us.
    1) First , please check the permission on /Library folder and see if you have full read & write access. If you don't, I would request you to have a conversation with Apple support.
    2) If the permissions are all fine on this folder, please check the same on ~/Library folder as well.
    If all is fine, i would request you to please reinstall the product and try again.

  • How to launch a Java application by clicking an icon for the windows system

    Hi Deal All,
    I am new in this forum, I am used to be at Cryptography. Currently I have completed a Java project and I am intending to launch it from Windows.
    I will design an icon but how I can launch the java application by clicking the icon in Windows system.
    Great thanks for your guidence!
    Best,
    Your friend.

    Hi Deal All,
    I am new in this forum, I am used to be at
    Cryptography. Currently I have completed a Java
    project and I am intending to launch it from Windows.
    I will design an icon but how I can launch the java
    application by clicking the icon in Windows system.
    Great thanks for your guidence!
    Best,
    Your friend.Make the icon a shortcut with a target of something like "javaw.exe YouClass.class"

  • I cannot down load Yosemite from the App Store. It keeps saying there is an error.  I have Mavericks installed now.  Can I download Yosemite anywhere else besides the App Store?

    I cannot down load Yosemite from the App Store. It keeps saying there is an error.  I have Mavericks installed now.  Can I download Yosemite anywhere else besides the App Store?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
              /var/log ▹ appstore.log
    from the hierarchical list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    Each message in the log begins with the date and time when it was entered. Select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, click the Clear Display button in the toolbar of the Console window and then try the installation again.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    ☞ The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

  • I am having problems installing Adobe Edge through the Adobe Application Manager

    I´m lost. I got an email advice to install Edge Animate.
    1. In IE the Install Manager never loaded. So I quit IE
    2. I finally go it to work in Google Chrome
    3. I clicked on install
    4. Everything got installed
    5. But there was no link on how to launch the installed application and no help
    Here is the last screen shot that I have. If I quit this install application, it appears that all is lost as my download will be cancelled and I won´t be able to use the application.
    However, there is nothing to click on to launch this application. I find nothing in my Control Panel and have no idea what URL to go to start.
    VERY POOR INSTRUCTIONS

    Same error as you. I may have gotten a step farther. If you click on the "More Details" you are probably going to see a number of warnings associated with Adobe Edge Animate Preview:
    Exit Code: 7
    Please see specific errors and warnings below for troubleshooting. For example,  WARNING: DW020 ...
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 0 error(s), 3 warning(s)
    WARNING: DW020: {6A725C8E-E4E1-474A-A2B1-C17CCC48EC01} Adobe Edge Animate 1.0.0.0 conflicts with: {76D14164-6EA2-4450-BEEF-E6690BFB4C28} Adobe Edge Animate Preview 1.0.0.0
    Please uninstall these products, restart your computer and then run this installer again.
    WARNING: DW020: NOTE: Cannot set action to the payload {6A725C8E-E4E1-474A-A2B1-C17CCC48EC01} Adobe Edge Animate 1.0.0.0 as conflicting payload is installed.
    WARNING: DW020: {6A725C8E-E4E1-474A-A2B1-C17CCC48EC01} Adobe Edge Animate 1.0.0.0 conflicts with: {76D14164-6EA2-4450-BEEF-E6690BFB4C28} Adobe Edge Animate Preview 1.0.0.0
    Please uninstall these products, restart your computer and then run this installer again.
    I've looked but still can't figure out how to uninstall the priview and apparently the Applications Manager isn't equipped to overwrite it. Last I checked the preview expires in a few weeks and becomes "unavailable". Does anyone have a solution for outright removing it before then?

Maybe you are looking for

  • Classpath Problems.

    Hi, I am getting the following errors, although i have set the jms.jar and com.ibm.mq.jar to my class path. package com.ibm.mq.jms does not exist import com.ibm.mq.jms.*; package javax.jms does not exist import javax.jms.*; Kindly help.

  • Accounting indicator for costing in Sales Order

    We need to find a trigger in the CRM sales order to define a separate costing approach, e.g. to generate an internal order in ECC. In Service, the "accounting indicator" triggers an internal order in ECC. We need something similar for sales orders. A

  • While updating through my pc my x10 software has crashed

    my internet lost its signal so there was a lapse in the time time of update then complete phone has crashed and it doesnt turned on furthur for which i have spent 1000rs in the service centre pls provide an information which we can do on our pc.....

  • Error in SELFITEM - SENDTASKDESCRIPTION

    Hi, When executing method SENDTASKDESCRIPTION to notify the completion of document its resulting with error "Document could not be sent". In the container Address strings are correctly filled to send. For few cases notifications are sent correctly. O

  • Hebrew syncing as gibberish from my calendar to Outlook BBQ10

    When I sync my calendar with BB Link all my hebrew words from my calendar appointements come out as gibberish on my PC in outlook. The same thing happenes when with the appointements from Outlook. The only difference is the type of gibberish. from ou