-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b27
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2221555 | 7u4 | Calvin Cheung | P3 | Closed | Fixed | b13 |
Older JRE/FX installers may cause registry corruption that will prevent us from sucessfully starting applet/JavaFX app.
One common case is that browser actually loads latest DT native plugin but will load older java plugin later on.
If DT can not detect this case then user will end up watching endless spinning wheel and will not see any error messages.
We should be able to
a) check whether java plugin registration is correct
b) initiate correction procedure
from inside DT plugin.
Possible API to be used from Javascript:
a) int validateJavaPlugin();
Returns 0 if current JavaPlugin is correctly registered
1 if registration is wrong and we can NOT fix in place
2 if registration is wrong and user can try fix in place
(may also consider different substatus for UAC on check)
It is sufficient to validate plugin for current browser only.
b) int fixJavaPlugin()
Attempts to fix registry problems.
Returns 0 on success, >0 on error
(if we can get detailed error codes (e.g. no permissions vs generic failure) it will be great)
Pseuse code for usage
function recover(doLaunchFunc) {
var r = dtplugin.fixJavaPlugin();
if (r != 0) {
//can we guess what is latest version here? JavaFX or JRE? version string?
//this will help to have more accurate message
showMessage("Failed to recover registry. Please reinstall JRE");
} else {
//success =>start
doLaunchFunc();
}
}
function validateAndRecover(onSuccessFunc) {
var r = dtplugin.validateJavaPlugin();
if (r == 0) {
onSuccessFunc(); //launch
return;
} if (r != 2) {
showMessage("Your Java setup is corrupt. <a onclick="recover(onSuccessFunc)">Click here to try to recover</a>.);
return;
} else if (r == 1) {
showMessage("Please reinstall JRE/JavaFX");
return;
}
}
Implementation notes.
1. In IE we need to at least check that
a) dll will be really loaded from latest deploy home for generic CLSID/latest CLSID and applet tag
2. In FF
a) only one java plugin registered
b) registered dll comes from latest deploy home
c) no dlls (old or new plugin) in plugins folder
3. To recover we can run
ssvagent -register
from latest deploy home
and wait for it to complete. Then repeat the validation check
4. We should only offer to recover if DT version is NO HIGHER than latest deploy version.
May want to ignore last part of the version (FX or not) but in general it will be bad idea
if older DT will try to call into newer JRE bits
One common case is that browser actually loads latest DT native plugin but will load older java plugin later on.
If DT can not detect this case then user will end up watching endless spinning wheel and will not see any error messages.
We should be able to
a) check whether java plugin registration is correct
b) initiate correction procedure
from inside DT plugin.
Possible API to be used from Javascript:
a) int validateJavaPlugin();
Returns 0 if current JavaPlugin is correctly registered
1 if registration is wrong and we can NOT fix in place
2 if registration is wrong and user can try fix in place
(may also consider different substatus for UAC on check)
It is sufficient to validate plugin for current browser only.
b) int fixJavaPlugin()
Attempts to fix registry problems.
Returns 0 on success, >0 on error
(if we can get detailed error codes (e.g. no permissions vs generic failure) it will be great)
Pseuse code for usage
function recover(doLaunchFunc) {
var r = dtplugin.fixJavaPlugin();
if (r != 0) {
//can we guess what is latest version here? JavaFX or JRE? version string?
//this will help to have more accurate message
showMessage("Failed to recover registry. Please reinstall JRE");
} else {
//success =>start
doLaunchFunc();
}
}
function validateAndRecover(onSuccessFunc) {
var r = dtplugin.validateJavaPlugin();
if (r == 0) {
onSuccessFunc(); //launch
return;
} if (r != 2) {
showMessage("Your Java setup is corrupt. <a onclick="recover(onSuccessFunc)">Click here to try to recover</a>.);
return;
} else if (r == 1) {
showMessage("Please reinstall JRE/JavaFX");
return;
}
}
Implementation notes.
1. In IE we need to at least check that
a) dll will be really loaded from latest deploy home for generic CLSID/latest CLSID and applet tag
2. In FF
a) only one java plugin registered
b) registered dll comes from latest deploy home
c) no dlls (old or new plugin) in plugins folder
3. To recover we can run
ssvagent -register
from latest deploy home
and wait for it to complete. Then repeat the validation check
4. We should only offer to recover if DT version is NO HIGHER than latest deploy version.
May want to ignore last part of the version (FX or not) but in general it will be bad idea
if older DT will try to call into newer JRE bits
- backported by
-
JDK-2221555 DT: need way to validate setup
-
- Closed
-