<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: iTheora and Java support detection</title>
	<atom:link href="http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection</link>
	<description>scratched tallies on the prison wall</description>
	<pubDate>Tue, 02 Dec 2008 14:12:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Eric Gerds</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-121034</link>
		<dc:creator>Eric Gerds</dc:creator>
		<pubDate>Thu, 05 Jun 2008 21:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-121034</guid>
		<description>Just to update, the url for Java detection is now here:

http://www.pinlady.net/PluginDetect/JavaDetect.htm

It turns out that for the newer versions of Sun Java, one can detect the JRE very quickly in Internet Explorer without starting up the full JRE. 

Older JRE versions are a different story.</description>
		<content:encoded><![CDATA[<p>Just to update, the url for Java detection is now here:</p>
<p><a href="http://www.pinlady.net/PluginDetect/JavaDetect.htm" rel="nofollow">http://www.pinlady.net/PluginDetect/JavaDetect.htm</a></p>
<p>It turns out that for the newer versions of Sun Java, one can detect the JRE very quickly in Internet Explorer without starting up the full JRE. </p>
<p>Older JRE versions are a different story.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Gerds</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98844</link>
		<dc:creator>Eric Gerds</dc:creator>
		<pubDate>Sat, 02 Jun 2007 15:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98844</guid>
		<description>If I ever find a way, I'll let you know. But for the time being there does not appear to be any practical answer. I have noticed that every new major version of Sun Java takes progressively longer to start up. They've done a pretty bad job with that.

Here are a few comments/tests regarding Java that I have so far:
http://www.pinlady.net/test/PluginDetect.htm
</description>
		<content:encoded><![CDATA[<p>If I ever find a way, I&#8217;ll let you know. But for the time being there does not appear to be any practical answer. I have noticed that every new major version of Sun Java takes progressively longer to start up. They&#8217;ve done a pretty bad job with that.</p>
<p>Here are a few comments/tests regarding Java that I have so far:<br />
<a href="http://www.pinlady.net/test/PluginDetect.htm" rel="nofollow">http://www.pinlady.net/test/PluginDetect.htm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98835</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Sat, 02 Jun 2007 15:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98835</guid>
		<description>Eric: that's why I asked for a way of detecting Java without starting Java. I can't use Flash because it doesn't play Ogg Theora. If there really &lt;em&gt;is&lt;/em&gt; no way of detecting Java without starting it then, well, I lose. :)</description>
		<content:encoded><![CDATA[<p>Eric: that&#8217;s why I asked for a way of detecting Java without starting Java. I can&#8217;t use Flash because it doesn&#8217;t play Ogg Theora. If there really <em>is</em> no way of detecting Java without starting it then, well, I lose. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Gerds</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98832</link>
		<dc:creator>Eric Gerds</dc:creator>
		<pubDate>Sat, 02 Jun 2007 15:23:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98832</guid>
		<description>I messed up that last part. What I wanted to say was I can detect if Java is some minimum version. If it is, Java starts. If it is not a minimum version, then it won't start up.

</description>
		<content:encoded><![CDATA[<p>I messed up that last part. What I wanted to say was I can detect if Java is some minimum version. If it is, Java starts. If it is not a minimum version, then it won&#8217;t start up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Gerds</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98814</link>
		<dc:creator>Eric Gerds</dc:creator>
		<pubDate>Sat, 02 Jun 2007 15:18:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98814</guid>
		<description>I am curious. have you tried Sun Java 1.6 lately? It takes ALOT longer to start up than Sun Java 1.5. So much so, that I consider it unbelievable - sometimes nearly 10 seconds or more. It's really, really bad.

If you put Java detection on your page, it looks to the user like your page never loads. Many people don't have the patience for that, and will just leave your site.

You might be better off using Flash for displaying videos, as opposed to Java.

So the question is what is more annoying. Having your home page appear that it doesn't ever load (in reality a bad delay due to Java startup), or having a message popup saying 'sorry' when they click on a link to see your video.

It is my conclusion that there is no way in IE to detect Java without starting it up. But that statement must be qualified.

Prior to IE 7, you could look for certain ActiveX objects like "JavaWebStart.isInstalled"
which would not start Java, and would tell you the Java Family version present.

However, IE 7 has made plugin detection for Java (and QuickTime) alot more difficult. All ActiveX objects are deactivated by default, meaning they won't work the first time unless the user clicks on that yellow security popup the first time. 

There are only a small number of pre-approved ActiveX controls that never give that popup.

So, for IE 

For IE 7, the best I can do is try to detect some minimum version of Java. If Java is  min version, then Java starts up.

I have spent the last year trying to find ways to detect Java. And there are no simple answers.
</description>
		<content:encoded><![CDATA[<p>I am curious. have you tried Sun Java 1.6 lately? It takes ALOT longer to start up than Sun Java 1.5. So much so, that I consider it unbelievable - sometimes nearly 10 seconds or more. It&#8217;s really, really bad.</p>
<p>If you put Java detection on your page, it looks to the user like your page never loads. Many people don&#8217;t have the patience for that, and will just leave your site.</p>
<p>You might be better off using Flash for displaying videos, as opposed to Java.</p>
<p>So the question is what is more annoying. Having your home page appear that it doesn&#8217;t ever load (in reality a bad delay due to Java startup), or having a message popup saying &#8217;sorry&#8217; when they click on a link to see your video.</p>
<p>It is my conclusion that there is no way in IE to detect Java without starting it up. But that statement must be qualified.</p>
<p>Prior to IE 7, you could look for certain ActiveX objects like &#8220;JavaWebStart.isInstalled&#8221;<br />
which would not start Java, and would tell you the Java Family version present.</p>
<p>However, IE 7 has made plugin detection for Java (and QuickTime) alot more difficult. All ActiveX objects are deactivated by default, meaning they won&#8217;t work the first time unless the user clicks on that yellow security popup the first time. </p>
<p>There are only a small number of pre-approved ActiveX controls that never give that popup.</p>
<p>So, for IE </p>
<p>For IE 7, the best I can do is try to detect some minimum version of Java. If Java is  min version, then Java starts up.</p>
<p>I have spent the last year trying to find ways to detect Java. And there are no simple answers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98807</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Sat, 02 Jun 2007 07:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98807</guid>
		<description>Eric: if I only detect Java after someone tries to watch the video, then anyone without Java installed will say "yes, show me the video!" and the site will say "well, you can't, unlucky". That's really annoying; we shouldn't offer people a chance to do something that we can know that they won't be able to do.</description>
		<content:encoded><![CDATA[<p>Eric: if I only detect Java after someone tries to watch the video, then anyone without Java installed will say &#8220;yes, show me the video!&#8221; and the site will say &#8220;well, you can&#8217;t, unlucky&#8221;. That&#8217;s really annoying; we shouldn&#8217;t offer people a chance to do something that we can know that they won&#8217;t be able to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Gerds</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98805</link>
		<dc:creator>Eric Gerds</dc:creator>
		<pubDate>Sat, 02 Jun 2007 05:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-98805</guid>
		<description>"What I’d like to do is only load the Java applet if someone asks to see the video"

How about you do Java detection only after someone asks to see the video? If Java is present, the Java detection starts up Java...but so what since you are going to be using Java anyway to display the video.

If Java is not present, no big deal. No startup delay since it is not installed.


Also it is usually IE that starts up Java during detection, not other browsers.</description>
		<content:encoded><![CDATA[<p>&#8220;What I’d like to do is only load the Java applet if someone asks to see the video&#8221;</p>
<p>How about you do Java detection only after someone asks to see the video? If Java is present, the Java detection starts up Java&#8230;but so what since you are going to be using Java anyway to display the video.</p>
<p>If Java is not present, no big deal. No startup delay since it is not installed.</p>
<p>Also it is usually IE that starts up Java during detection, not other browsers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rgm</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-78443</link>
		<dc:creator>rgm</dc:creator>
		<pubDate>Thu, 22 Mar 2007 22:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-78443</guid>
		<description>I understand you're trying to detect java without actually launching a JVM -- that's hard.  When I solved this problem I did not have that requirement, so I load a 1.0-compatible applet with a public getVersion() method that returns System.getProperty("java.version") to query the JVM version.  I also load both of these scripts (one is a .vbs just for IE, the .js for Firefox) on the page to check from script:

These scripts need tweaking to apply to your situation, in my case I was sniffing for 1.4 support.
---- from checkjava.js (firefox /netscape compatible) ------------
var supports14 = false;
function checkJava() {
  // Firefox
  if ( navigator.plugins &#38;&#38; navigator.plugins.length &#62; 0 ) {
    nps = navigator.plugins;
    for ( i = 0; i = 0 ) {
          idx = mtype.type.indexOf("version=");
          if ( idx &#62; 0 ) {
            version = mtype.type.substr( idx + 8, 3 );
            if ( version == "1.4" ) { supports14 = true; break; }
          }
        }
      }
    }
  }
}

---------- from checkjava.vbs (for IE) -----------------------------
'* Note that is_ie has been previously defined, prolly based on User-Agent string
on error resume next
If is_ie Then
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled"))) Then
     javawsInstalled = 0
  Else
     javawsInstalled = 1
  End If
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.4.2.0"))) Then
     javaws142Installed = 0
  Else
     javaws142Installed = 1
  End If
  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.5.0.0"))) Then
     javaws150Installed = 0
  Else
     javaws150Installed = 1
  End If
  supports14 = javaws150Installed Or javaws142Installed
End If

'* needs updating for java 1.6</description>
		<content:encoded><![CDATA[<p>I understand you&#8217;re trying to detect java without actually launching a JVM &#8212; that&#8217;s hard.  When I solved this problem I did not have that requirement, so I load a 1.0-compatible applet with a public getVersion() method that returns System.getProperty(&#8221;java.version&#8221;) to query the JVM version.  I also load both of these scripts (one is a .vbs just for IE, the .js for Firefox) on the page to check from script:</p>
<p>These scripts need tweaking to apply to your situation, in my case I was sniffing for 1.4 support.<br />
&#8212;- from checkjava.js (firefox /netscape compatible) &#8212;&#8212;&#8212;&#8212;<br />
var supports14 = false;<br />
function checkJava() {<br />
  // Firefox<br />
  if ( navigator.plugins &amp;&amp; navigator.plugins.length &gt; 0 ) {<br />
    nps = navigator.plugins;<br />
    for ( i = 0; i = 0 ) {<br />
          idx = mtype.type.indexOf(&#8221;version=&#8221;);<br />
          if ( idx &gt; 0 ) {<br />
            version = mtype.type.substr( idx + 8, 3 );<br />
            if ( version == &#8220;1.4&#8243; ) { supports14 = true; break; }<br />
          }<br />
        }<br />
      }<br />
    }<br />
  }<br />
}</p>
<p>&#8212;&#8212;&#8212;- from checkjava.vbs (for IE) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8216;* Note that is_ie has been previously defined, prolly based on User-Agent string<br />
on error resume next<br />
If is_ie Then<br />
  If Not(IsObject(CreateObject(&#8221;JavaWebStart.isInstalled&#8221;))) Then<br />
     javawsInstalled = 0<br />
  Else<br />
     javawsInstalled = 1<br />
  End If<br />
  If Not(IsObject(CreateObject(&#8221;JavaWebStart.isInstalled.1.4.2.0&#8243;))) Then<br />
     javaws142Installed = 0<br />
  Else<br />
     javaws142Installed = 1<br />
  End If<br />
  If Not(IsObject(CreateObject(&#8221;JavaWebStart.isInstalled.1.5.0.0&#8243;))) Then<br />
     javaws150Installed = 0<br />
  Else<br />
     javaws150Installed = 1<br />
  End If<br />
  supports14 = javaws150Installed Or javaws142Installed<br />
End If</p>
<p>&#8216;* needs updating for java 1.6</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-75489</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Tue, 20 Mar 2007 13:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-75489</guid>
		<description>ppk: if it were that easy I'd have done that already. :) IE6 *sometimes* will return false for navigator.javaEnabled() if you're using a non-Microsoft Java. It's also, apparently, broken in lots of versions of Netscape/Mac (which I can't test).</description>
		<content:encoded><![CDATA[<p>ppk: if it were that easy I&#8217;d have done that already. :) IE6 *sometimes* will return false for navigator.javaEnabled() if you&#8217;re using a non-Microsoft Java. It&#8217;s also, apparently, broken in lots of versions of Netscape/Mac (which I can&#8217;t test).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ppk</title>
		<link>http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-75484</link>
		<dc:creator>ppk</dc:creator>
		<pubDate>Tue, 20 Mar 2007 12:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2007/03/20/itheora-and-java-support-detection#comment-75484</guid>
		<description>if (navigator.javaEnabled())

should do the trick. I'm not totally sure it works in all browsers, though, and it merely states that Java is available, not that it is already running.</description>
		<content:encoded><![CDATA[<p>if (navigator.javaEnabled())</p>
<p>should do the trick. I&#8217;m not totally sure it works in all browsers, though, and it merely states that Java is available, not that it is already running.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
