Forum Stats

  • 3,751,638 Users
  • 2,250,379 Discussions
  • 7,867,490 Comments

Discussions

Problems using deployJava.js with Java 7

854422
854422 Member Posts: 22
edited Dec 21, 2011 7:24AM in Java Web Start & JNLP
I found problems which vary by browser to the following script in an HTML page on Windows 7:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Launch me!!!
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
deployJava.setInstallerType("kernel");
deployJava.createWebStartLaunchButton("yourAppHere.jnlp", '1.7.0');
</script>
</body>
</html>

The problem shows itself when Java 7 is not yet installed. Note: There is no need to have an actual "yourAppHere.jnlp", since the problems surface prior that being a requirement.

Firefox 8.0:
------------
When the Launch button is clicked on Firefox, a brief dialog with a progress bar appear showing a small download. At completion, a Security Warning dialog appears:
"This Java installer did not come from Sun...". The publisher is shown as Oracle America, Inc.

The install proceeds as normal if the user overides the warning (though eventually missing a real jnlp will catch up with you). I do not know for sure but suspect the problem is with deployJava.js. One fixing this might also want to consider the implications MacOSX port when it is up and ready.

IE 9.0.3:
------------
This browser is a total failure. The initial download dialog progresses to the end, then remains & the session is hung. The dialog is modal, so the only escape other than the power button is killing it via Task Manager.

I am pretty sure these are bugs, but thought would see if others can reproduce Just save html to a file on desktop & double-click. Have these already been reported? Are there other tests that would be good? It has been years since I reported a Java bug, are there directions?

Edited by: user3055980 on Nov 13, 2011 11:36 AM

Best Answer

  • 817264
    817264 Member Posts: 342
    Accepted Answer
    deployJava.js is backed by native library that is part of JRE you have or had installed.
    Everything before first installation dialog (detection, security message, download dialogs, etc.) is coming from this library.

    I believe FF behavior is expected. You have "old" JRE installed (one that was released before acquisition by Oracle or before JRE was updated to treat Oracle as JRE "owner") and therefore publisher of newer JRE is not considered to be pretrusted. This problem will go away once user migrate to "Oracle-aware" JRE.

    Check dll version of deployJava1.dll and npDeployJava1.dll loaded by browser process (e.g. use Process Explorer tool fro sysinternals.com) to find out what version you are using. To report a bug follow instructions here - http://bugreport.sun.com/bugreport/.

Answers

  • 817264
    817264 Member Posts: 342
    Accepted Answer
    deployJava.js is backed by native library that is part of JRE you have or had installed.
    Everything before first installation dialog (detection, security message, download dialogs, etc.) is coming from this library.

    I believe FF behavior is expected. You have "old" JRE installed (one that was released before acquisition by Oracle or before JRE was updated to treat Oracle as JRE "owner") and therefore publisher of newer JRE is not considered to be pretrusted. This problem will go away once user migrate to "Oracle-aware" JRE.

    Check dll version of deployJava1.dll and npDeployJava1.dll loaded by browser process (e.g. use Process Explorer tool fro sysinternals.com) to find out what version you are using. To report a bug follow instructions here - http://bugreport.sun.com/bugreport/.
  • 854422
    854422 Member Posts: 22
    Thanks for responding. You have answered part, including how to submit bugs. This system has just been rebuilt from the bare metal on Monday. There was a JDK & a previous JRE installed, both 1.6.0_29, before I had the thought to try 1.7.0. Sounds like the first bug will be to correct the DLL's if there is ever a 1.6.0_30 to stop checking for installs from the publisher "Sun". Minor bug, but also a minor fix.

    The IE issue is much worse. Think I am going to un-install everything & retry for more data points tomorrow.

    Thanks again.
  • 854422
    854422 Member Posts: 22
    Before un-installing anything except the 1.7.0 JRE from a previous test, I did a search deployJava1.dll, I found 5. All show File Version 6.0.290.11 on the details tab of the properties dialog. That is not to say they are all the same file. I installed a 64 bit JDK, and apparently a 32 bit JRE. I do not remember exactly how I did that. Using the Process Explorer & clicking on the binoculars to find deployJava.dll, it shows that one being used is in C:\Windows\SysWOW64. I am really starting to hate having a JRE built into a JDK. Here is the list:
    1- 513KB 11/7/2011 C:\Program Files\Java\jre6\bin
    2- 513KB 11/7/2011 C:\Window\System32
    3- 513KB 11/7/2011 C:\Program Files\Java\jdk1.6.0_29\jre\bin
    4- 461KB 10/3/2011 C:\Program Files (x86)\Java\jre6\bin
    5- 461KB 10/3/2011 C:\Windows\SysWOW64
    FYI, checks for npDeployJava1.dll were consistent with above, though some were in a new_plugin sub dir. Also, FireFox is x86, not amd64.
    -----------
    Removing the JDK6 Update 29 (64-bit) knocked out #3.
    Removing Java(TM) 6 Update 29 (64-bit) knocked out #1.
    Removing Java(TM) 6 Update 29 knocked out # 4.
    That leaves 2 & 5 still in place (Did not find any let over npDeployJava1.dll's). Nuked them manaully.

    HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA}\InprocServer32
    HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA}\InprocServer32

    This registry pattern seemed to be repeated, just kept deleting.
    -----------
    Have a clean system, and am now retrying the tests, BUT IT TRIES TO RUN jre-6u29-windows-i586-iftw-k.exe INSTEAD! I actually followed through for IE & 1.6 is what gets installed NOT 1.7. This is by far the worst. The other stuff might just be because of that stupid JRE instead the JDK. Double checked both the html & JNLP they are still asking for 1.7. Is this a bug or somehow intentional?
  • 817264
    817264 Member Posts: 342
    1. Do not worry about copies in the JRE folders.
    Browser will use what is registered as plugin in them (you can see what is registered by looking to Addons, or about:plugins, etc.) and typically this is copy of DLL
    in the windows system folder.

    2. dll in windows system folder is left behind by design. To support on demand install if needed in the future.

    3. I believe kernel JRE is discontinued in JRE7. It is weird you are getting kernel installer for previous release (and i think this is already reported as bug) but perhaps you should not be requesting kernel anyways.

    4. Version requested in JNLP is not used by deployment toolkit. It will only be used if you launch using javaws or will not have specific (or will have relaxed) requirements in your call using deployment toolkit
  • 906128
    906128 Member Posts: 5
    hi,

    I'm using JNLP,

    not any error when calling from IE 9

    but try to IE 8

    following errors,

    deployJava is undefined !

    i was checked the settings both of them, I can't see strange anything.

    plese help
  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    serdaraytac wrote:
    hi,

    I'm using JNLP,

    not any error when calling from IE 9

    but try to IE 8

    following errors,

    deployJava is undefined !

    i was checked the settings both of them, I can't see strange anything.

    plese help
    Javascript turned off / some kind of javascript blocker plugin?
This discussion has been closed.