8 Replies Latest reply on Mar 6, 2010 6:24 AM by 843804

    Best JRE link for a consumer JNLP product

      I have a JNLP deployed, consumer, product close to being done. Supported platforms will be Windows & Snow Leopard. For Windows, I need a link to direct customers to get a runtime. I can make NO assumption that they even know what Java is. I want the experience to as simple as Acrobat or Flash runtime.

      The standard spot I use for myself, http://java.sun.com/javase/downloads/index.jsp , has all kinds of stuff that they will have no idea about. Giving them choices they do not understand just as prerequisite to installing your product seems like a really bad idea.

      The standard page points to https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u18-oth-JPR@CDS-CDS_Developer

      This has the release baked into the GET url. Will it suddenly stop working when u19 is out? Is this page meant to be gone to directly? I have heard that there is or going to be a Java store, but I am using a lease / monthly subscription business model, and already have my own credit card back-end interface. Where do users of that store get their JRE?
        • 1. Re: Best JRE link for a consumer JNLP product
          Use [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html] for writing the JNLP link. deployJava is a script that Sun encourages us to hot-link to, in order to check the end user has the minimum required Java before offering them the link to the app. If the end user does not have Java, it will do its best to guide them through the Java installation process.
          • 2. Re: Best JRE link for a consumer JNLP product
            Andrew, that looks desirable. A web sourced java script beats anything I would have to maintain, assuming it works. I have an old notebook with XP & Vista partitions that I can uninstall Java on. My Windows 7-64 machine is not a spare though. I'll leave that one for last.

            I thought these scripts all rely on both IE Explorer and ActiveX, which only a crazy person leaves turned on. I hope the script has a back up plan, to just open a new window @ http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab or whatever the equivalent 64 bit is. I tried ...-amd64.cab, but not found.

            This will take me about a week to test. I'll comeback with a browser-OS-ActiveX matrix & mark it answered or say what I found.
            • 3. Re: Best JRE link for a consumer JNLP product
              To improve the user experience at installing even more, you should set "deployJava.setInstallerType("kernel");" so it's linking directly to an installer-exe-file which only installs the base JRE. So the user doesn't have to go to java.com first and doesn't have to install the whole big JRE at once (The other parts are installed in the background).
              • 4. Re: Best JRE link for a consumer JNLP product
                I have similar questions. I have a game that is a Java applet. On the main webpage (no applet on this page) there is a "play" button. Clicking the play button loads a new tab/window with the applet on it. I am using Nimbus, so the user should have 1.6.0_10 or later plugin.

                I am trying to make things as easy for users as possible, and so far, the solutions I have found have subtle problems.

                If I use the normal deployJava.js script from Sun, when a user clicks on my "play" link, instead of going to the applet page it takes them to the Sun page to download the plugin. This seems very confusing to me. If you know nothing about Java, and click on a "Play" link, and see a totally unrelated page asking you to download something, wouldn't that be really confusing? I know if my dad did this, there is no way he would click the download link because it seems very suspicious.

                The previous post recommends using deployJava.setInstallerType("kernel"); to make it easier, but a little googling makes it sound like this is no less confusing. I tried, and instead of a webpage, it pops up a window saying something like "you have chosen to download..." or something similar--also seems confusing.

                I followed the example from http://java.sun.com/docs/books/tutorial/deployment/deploymentInDepth/ensuringJRE.html to make it pop up a message, but when using IE it says it passes the check and loads it with the outdated JRE plugin. It works in Firefox, but the titlebar, etc. are ugly/messy (with the whole URL displaying, etc.).

                • 5. Re: Best JRE link for a consumer JNLP product
                  Well, of course you shouldn't simply do a
                  deployJava.runApplet(var0, var1, var2);
                  Much better is something like this:
                  <script src="http://www.java.com/js/deployJava.js"></script>
                            if(deployJava.versionCheck("1.6+")) {
                                             draggable: true,
                                             width: 320,
                                             height: 600,
                                             code: 'app.Main'
                                             jnlp_href: 'Applet.jnlp',
                            else {
                                 document.writeln('<a href="#" onclick="javascript:deployJava.installLatestJRE();">You don\'t have a recent version of Java. Please upgrade it by clicking here.</a>');
                  • 6. Re: Best JRE link for a consumer JNLP product
                    Now I am getting even stranger things happening. On one machine with just the code
                    deployJava.runApplet(attributes, parameters, version);
                    (and setting of variables, of course), it automatically downloads nicely just like I want, but then when it is done and tries to reload the applet again, it pops up the following:

                    "Revocation information for the security certificate for this site is not available. Do you want to proceed?"

                    I assume this has to do with the Java download since if I "view certificate" is gives sjremetrics.java.com as the "issued to".

                    Any suggestions?
                    • 7. Re: Best JRE link for a consumer JNLP product
                      Perhaps I should mention the certificate has an expiration of 2/2/2010. Could it be that if your browser settings are not very restrictive, it does not matter, but if they are, they flag it because of the date? And if so, how do I ask them (Sun) to get the certificate updated?
                      • 8. Re: Best JRE link for a consumer JNLP product
                        I seem to have gotten this to work (almost) correctly now by going back to a very basic version of the loading page. Not sure what I was doing wrong. Still have a few subtle issues, but I am moving to JWS and hopefully will get everything resolved quickly.