sábado, 25 de junho de 2011

Problema para instalar o Módulo de Proteção do Santander no Chrome

Ao tentar instalar o módulo de proteção do Santander no Chrome, passei pela seguinte situação. Eu era redirecionado para a página de instalação do Java. E, embora eu confirmasse que já tenho a versão mais atual do Java clicando no link Tenho o Java?, toda vez acontecia a mesma coisa.

Depois de algumas horas, descobri que trata-se de um problema do Chrome com o uso do script de instalação do Java, conforme expliquei em meu post anterior (em inglês).

O problema ocorre se você tiver mais de uma versão de JRE (máquina virtual do Java) instalada em seu PC.

Solução
A solução para usuários do Chrome é deletar ou desinstalar as versões antigas do Java, seguindo estas instruções. Afinal, conforme o próprio site do Java, "É altamente recomendável que os usuários removam do sistema todas as versões anteriores do Java."

UPDATE (09/01/2012): confira um "Outro Problema ao instalar o Módulo de Proteção do Santander no Chrome".

sexta-feira, 24 de junho de 2011

Chrome bug with Java Deployment Toolkit Script

When trying to install a Java plugin for the Chrome browser, it redirects to the Java Download Page. And though you can see you have the required Java version by testing it thru the Java version verification page, it keeps redirecting to the Java Download Page.

It happened to me when I tried to install a Brazilian bank website's security module in Chrome version 12.0.742.100.

The problem occurs when the getJREs() method of the Java Deployment Toolkit Script is called. The script is available at http://java.com/js/deployJava.js. The problem is that If you have more than one JRE installed on your Windows OS (mine is XP), instead of giving all your versions, it gives just one of your versions (repeated by the number of versions you got indeed).

At least in my pc, which has 2 versions, 1.4.1_02 and 1.6.0_26, getJREs() returns an array with 2 strings, but both are “1.4.1_02”. Both JREs are installed under C:\Program Files\Java (in fact my path is “C:\Arquivos de programas\Java” since it’s the Portuguese translation). Their folder names are “j2re1.4.1_02” and “jre”, respectively. My JAVA_HOME environment variable points to the newer version.
Internet Explorer 8 and Firefox 4.0.1 returns correctly both versions “1.4.1_02” and “1.6.0_26” strings.

I don't know if this bug has already been documented. In fact I’m not totally sure it’s a Chrome bug, but it seems to be, since IE and Firefox work fine with it.

All I could find is that the bug is related to the object embedded by a <embed hidden="true" id="deployJavaPlugin" type="application/java-deployment-toolkit"></embed> tag which is added to the HTML document by the script code, to be retrieved later with document.getElementById for its specific usage.

Test
You can test it with my getJREs Test page.

Quick Solution for Chrome Users
You probably don’t need the older versions of Java. In fact according to Java website they "highly recommend users remove all older versions of Java from your system." (read more here). So just delete them, or follow these instructions.