This discussion is archived
12 Replies Latest reply: Sep 10, 2009 6:39 AM by 843802 RSS

Detecting java won'w work in IE

843802 Newbie
Currently Being Moderated
Hi to all,
Hope you all will be fine. I have an applet. I simply want to check if the user has java installed on his computer or not, If not then it simply pops up a message that you don't have java and when you click ok it redirect you to tha java installation page.The problem is i called the applet through PHP so what i did i simply put a JavaScript before calling the applet it works fine In FireFox and IE if you hava java means in the script i set a condition that (!navigator.javaEnabled()) then alert("////") if you have java installed on your computer and if i remove the ! sign means if you hava java then alert then its work fine in IE8 and IE7 but not in IE6, and if you do not have java installed then it not work at all. If i run this code in IE6 04 IE7 or IE8 then no error shown but in the place of applet a cross mark appear. I know IE7 and IE8 uses their own java check but i want my alert box is shwon. I tried many scripts but al fail in IE, In FireFox it works fine, actually i m not limited to Only FireFox and IE but atleast IE should run this code because its a popular browser. So i post my code please tell me waht's wrong with the code why IE don't show any message if Java is not installed and how can i do it in all IE6 and IE7 and IE8.This is a PHP file. One thing more if you hava java installed then it shows the applet in IE7 and IE8 but not in IE6 so please also mention why it is happening .
I did one thing i include a html file in my php code which include the code present at http://forums.sun.com/thread.jspa?threadID=168544 topic name is Re: ANSWER: HOW TO DETECT Java Plugin from JavaScript
Nov 5, 2001 11:50 AM (reply 5 of 33) (In reply to #4 )

I have java but its shown that you dont have java plugin please tell me how can i check java in my php file, any method by any means but i want java check working in all browsers IE, firefox, opera, safari, chrome etc if not all then atlease IE and firefox .Please help

Thank you

<?php

$id = $_GET['Uniqueid'];

$uname = $_GET['Username'];

?>&#12288;

<script language="JavaScript">

<!--

function test()

{

var UNI = document.applets.TestApp;

var subor = UNI.getFile();

alert(subor);

return false;

}

//-->

</script>

<head>

<body>

<script language="Javascript" type="text/javascript">

if(!navigator.javaEnabled()){

window.alert('Enable your java to expeirience this java enhanced page or\n try install it...');

window.open( "http://www.java.com/en/download/index.jsp", "JAVA Installation Manual", "width=500, height=500, location=0, scrollbars=1, toolbar=0" );

}

</script>

<noscript>

Enabled javascript please

</noscript>

<?php

$applet='<APPLET CODE = "CapturePlayback1.class" ARCHIVE = "CapturePlayback1.jar" WIDTH = "240" HEIGHT = "210" NAME = "Bright Americans Inc." MAYSCRIPT = true>





<PARAM NAME="uid" VALUE="'.$id.'">

<PARAM NAME="uname" VALUE="'.$uname.'">&#12288;

</APPLET> ';

echo $applet;

?>

</body>

</head>
  • 1. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    Hi to all,
    I come to know that (navigator.javaEnabled()) not actually check java in your system in IE, and i also known why it is throwing message when i change condition to (navigator.javaEnabled()), so any one tell me how can i check whether java is installed on your system or not in IE by means of any scripting .
    Thank you
  • 2. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 3. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 4. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 5. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 6. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 7. Re: Detecting java won'w work in IE
    793415 Pro
    Currently Being Moderated
    Terry56 wrote:
    ...I tried many scripts ...
    Did you try deployJava.js, the only script issued and supported by Sun? If you follow the link to the [Applet Deployment|http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html] page of the technotes for applets. and follow the link from there to the Deployment Advice mentioned in the Introduction, you will see a further description of the script, as well instructions for its use.
  • 8. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    have you tried pinlady plugin detector script. Its a bit over kill but it detects all your plugins.
    you can detect a number of plugins.

    The link below should detect your java version for you and is not majorly intrusive.
    Try it... (i dont know if im suppose to post links. If it doesnt work message me.)

    http://www.pinlady.net/PluginDetect/JavaDetect.htm
  • 9. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    have you tried pinlady plugin detector script. Its a bit over kill but it detects all your plugins.
    you can detect a number of plugins.

    The link below should detect your java version for you and is not majorly intrusive.
    Try it... (i dont know if im suppose to post links. If it doesnt work message me.)

    http://www.pinlady.net/PluginDetect/JavaDetect.htm
  • 10. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    have you tried pinlady plugin detector script. Its a bit over kill but it detects all your plugins.
    you can detect a number of plugins.

    The link below should detect your java version for you and is not majorly intrusive.
    Try it... (i dont know if im suppose to post links. If it doesnt work message me.)

    http://www.pinlady.net/PluginDetect/JavaDetect.htm
  • 11. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    Hi all,

    1) I would like to detect whether the java-plugin of the internet explorer is enabled (i.e., Scripting Of java Applets is activated or not) using Java Script.
    Within firefox this could be easily done using the Java-Script "navigator.javaEnabled" method.
    Unfortunately, this method does not work in IE.

    Moreover, I tried the "pinlady" detection (http://www.pinlady.net/PluginDetect/) as well as the "deployJava.js" (http://download.oracle.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html) "libraries". Both "libraries" failed to determine the activation status of the Java plugin correctly for IE.

    I can not believe, that there is no way to detect the activation status of a Java plugin within IE correctly ...


    2) Moreover, I analyzed that within Internet Explorer (IE) an applet starts (i.e., the init() & start-methods are invoked) even if the Java plugin is disabled / deactivated. In my opinion, this is not a desired application behavior. For example, using Firefox the applet does not start when the Java plugin is diabled.
    Can anybody explain this behavior or give me some more information?


    I really appreciate your help!!!

    Kind regards,
    tbeer
  • 12. Re: Detecting java won'w work in IE
    843802 Newbie
    Currently Being Moderated
    "Both "libraries" failed to determine the activation status of the Java plugin correctly for IE."

    Just curious. How did you disable Java in IE?