Netscape 6 & Java Plugin

Hi,
I am trying to write an Applet which will run in both Netscape and IE, using the Java Plugin. I have problems scripting the applet using Javascript when in Netscape - due to problems with Live Connect, I understand.
I realise that Sun say Netscape 4.X cannot script applets running in Java Plugin but I thought Netscape 6 should be able to. I have tried on Netscape 6.1 running Java Plugin 1.3.1_01 with no luck - I keep getting an error: "document.FT.getString is not a function". Has anyone had any luck at getting Netscape 6 to script applets running through Java Plugin? I have looked through newsgroups but haven't found any information on scripting plugin applets on Netscape.
I would be very grateful for any information!
Kevin.

OK, here's my code. The class the applet is in is called Applet and it is contained within a JAR archive called signedApplet.jar. This should work OK although I have changed the name of the Applet and the archive for the purposes of simplicity.
<SCRIPT LANGUAGE="JavaScript"><!--
var _info = navigator.userAgent;
var _ns = false;
var ie = (info.indexOf("MSIE") > 0 && info.indexOf("Win") > 0 && info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
var ns = (navigator.appName.indexOf("Netscape") >= 0 && ((info.indexOf("Win") > 0 && info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
//--></SCRIPT></COMMENT>
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true)
     document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ID="FT" WIDTH = 0 HEIGHT = 0 NAME = "Applet" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">');
     document.writeln('<PARAM NAME = CODE VALUE = "Applet" >');
     document.writeln('<PARAM NAME = ARCHIVE VALUE = "signedApplet.jar" >');
     document.writeln('<PARAM NAME = NAME VALUE = "Applet" >');
     document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">');
     document.writeln('<PARAM NAME="scriptable" VALUE="true">');
     document.writeln('<PARAM NAME="mayscript" VALUE="true">');
     document.writeln('</OBJECT>');
else if (_ns == true)
     //if netscape 6 then just use standard Applet tag
     if (navigator.userAgent.indexOf("Netscape6")>0)
          document.writeln('<APPLET ID="FT" ARCHIVE="signedApplet.jar" CODE = "Applet" WIDTH = 0 HEIGHT = 0 NAME = "Applet"></APPLET>');
     else
          document.writeln('Sorry, Netscape versions higher than 6.0 or Microsoft Internet Explorer 5.0 must be used to view this page.');
//--></SCRIPT>

Similar Messages

  • Java Plugin won't work in Netscape 7.1

    I'm using Windows XP Home with Netscape 7.1, and the Java plugin won't work.
    Java Plug-in 1.4.2_05 for Netscape Navigator (DLL Helper) is listed 7 times in Help>About:Plugins;
    The Java Plugin works in Internet Explorer (I use the Test Java Virtual Machine to determine this). With Netscape, I just get the "Click here to get the plugin" window, and believe me, I've clicked here many times, and gone through the installation process, and it still doesn't work. I've uninstalled Java, rebooted, and installed it with the browsers closed, and it still doesn't work. Everything else in Netscape seems to be working properly.
    Under Edit>Preferences>Advanced in Netscape I have "Enable Java" checked.
    I posted this problem in the Windows-BBS Netscape and Mozilla forum, http://www.windowsbbs.com/showthread.php?t=33994, and tried everything suggested there, but it still didn't work.
    Anybody have any suggestions?

    I was facing a similar problem. I think the problem is with different versions of JRE. For example, I was trying to associate with Netscape the JRE version of 1.4.2_01 without any success. But on associating jdk version 1.4.2_05, it started working fine.
    Regards,
    Harish

  • Auto detect missing java plugin with Netscape

    How do I get Netscape to automatically detect that it is missing the Java Plugin, and go to Sun's download page? I have IE 5.5 and Netscape 7 installed.
    My html looks like this:
    <OBJECT
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase = "http://java.sun.com/products/plugin/1.4/jinstall-1_4-windows-i586.cab#Version=1,4,1,0"
    WIDTH = "100%" HEIGHT = "500" >
    <PARAM NAME = CODE VALUE = "nz.astarte.planwise.gantt.GanttApplet" >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "pwgantt.jar" >
    <PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.4">
    <PARAM NAME = "scriptable" VALUE = "false">
    <PARAM NAME = "projectId" VALUE="<%=theForm.getProjectId().toString()%>" >
    <PARAM NAME = "userId" VALUE="<%=userId%>" >
    <PARAM NAME = "logLevel" VALUE="INFO" >
    <COMMENT>
    <EMBED
    type = "application/x-java-applet;version=1.4"
    CODE = "nz.astarte.planwise.gantt.GanttApplet"
    JAVA_CODEBASE = "."
    ARCHIVE = "pwgantt.jar"
    WIDTH = "100%"
    HEIGHT = "500"
    projectId ="<%=theForm.getProjectId().toString()%>"
    userId ="<%=userId%>"
    logLevel ="INFO"
    scriptable = false
    pluginspage = "http://java.sun.com/getjava ">
    <NOEMBED>
    Could not find a plugin supported by your browser. Please download Sun's Java Plugin 1.4.1
    </NOEMBED>
    </EMBED>
    </COMMENT>
    </OBJECT>
    IE will autodetect and begin the download process. I know Netscape doesn't auto download, but it should at least detect it needs the plugin and go to the http://java.sun.com/getjava page so the user can do a manual download. However all I get is a big black blob where my applet should be.
    Thanks in advance,
    Andrew

    I have modified your EMBED tag a little bit. I think it should work:
    <EMBED
    type="application/x-java-applet;jpi-version=1.4.1"
    CODE="nz.astarte.planwise.gantt.GanttApplet"
    CODEBASE="."
    ARCHIVE="pwgantt.jar"
    WIDTH="100%"
    HEIGHT="500"
    projectId="<%=theForm.getProjectId().toString()%>"
    userId="<%=userId%>"
    logLevel="INFO"
    scriptable=false
    pluginspage="http://java.sun.com/j2se/1.4.1/download.html">
    <NOEMBED>
    Could not find a plugin supported by your browser. Please download Sun's Java Plugin 1.4.1
    </noembed>
    </embed>
    Hope it helps!
    A.A.
    How do I get Netscape to automatically detect that it
    is missing the Java Plugin, and go to Sun's download
    page? I have IE 5.5 and Netscape 7 installed.
    My html looks like this:
    <OBJECT
    classid =
    d = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase =
    e =
    "http://java.sun.com/products/plugin/1.4/jinstall-1_4-w
    ndows-i586.cab#Version=1,4,1,0"
    WIDTH = "100%" HEIGHT = "500" >
    <PARAM NAME = CODE VALUE =
    E = "nz.astarte.planwise.gantt.GanttApplet" >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "pwgantt.jar" >
    <PARAM NAME = "type" VALUE =
    E = "application/x-java-applet;version=1.4">
    <PARAM NAME = "scriptable" VALUE = "false">
    <PARAM NAME = "projectId"
    Id" VALUE="<%=theForm.getProjectId().toString()%>" >
    <PARAM NAME = "userId" VALUE="<%=userId%>" >
    <PARAM NAME = "logLevel" VALUE="INFO" >
    <COMMENT>
    <EMBED
    type =
    type = "application/x-java-applet;version=1.4"
    CODE =
    CODE = "nz.astarte.planwise.gantt.GanttApplet"
    JAVA_CODEBASE = "."
    ARCHIVE = "pwgantt.jar"
    WIDTH = "100%"
    HEIGHT = "500"
    projectId
    projectId ="<%=theForm.getProjectId().toString()%>"
    userId ="<%=userId%>"
    logLevel ="INFO"
    scriptable = false
    pluginspage = "http://java.sun.com/getjava ">
    <NOEMBED>
    Could not find a plugin supported by your
    ted by your browser. Please download Sun's Java Plugin
    1.4.1
    </noembed>
    </embed>
    </COMMENT>
    </object>
    IE will autodetect and begin the download process. I
    know Netscape doesn't auto download, but it should at
    least detect it needs the plugin and go to the
    http://java.sun.com/getjava page so the user can do a
    manual download. However all I get is a big black blob
    where my applet should be.
    Thanks in advance,
    Andrew

  • Problem installing java plugin from jre 1.4.0 on netscape 4.79

    We tried to install the newest java plugin on netscape
    4.79 on our Solaris 2.8 machine. Followed the instruction, we first downloaded j2re-1_4_0-solsparc.sh, ran the script to create a
    directory called j2re1.4.0, then set the NPX_PLUGIN_PATH environment variable to the directory
    containing the javaplugin.so file. When we tried to
    start netscape, we got the following error message:
    INTERNAL ERROR on Browser End: Could not load the function CreateOJIFactory
    System error?:: No such file or directory
    What is the problem? Any fix?
    Thanks

    Hi,
    From your description, it seems you've read http://java.sun.com/j2se/1.4/install-solaris.html#plugin . This also states that the supported Netscape builds go up to 4.77 before moving on to Netscape 6.x. And in this case it appears that this isn't just because the documentation hasn't kept up with recent activity from Netscape. Netscape 4.79 appears to treat the plugin differently, and/or still expect the old Activator code to be in place to use it.
    I'm using the 1.4.0 JRE with no trouble at all with Netscape 7.0PR1. If anything this - and the Mozilla 1.0RC2 build that it's based on - are far more stable than any of the NS4.x releases. The only reason I can see for staying with 4.x is that it'd little more lax with the HTML it reads, and displays some bad pages that NS6/7 refuses to display.
    Recent Solaris releases come with Netscape 6 as well, and it's easily downloadable. I'm sorry I can't be more help than this.
    Mark Bowyer.
    Sun Developer Technical Support.

  • Applet AccessControlExceptions using Netscape and Java plugin

    I get the following AccessControlException when running a simple applet that tries to connect to an RMI object when using Netscape Communicator 4.5 with the Java plugin supplied with JDK1.3
    java.security.AccessControlException: access denied (java.net.SocketPermission 10.195.57.34:1489 connect,resolve)The HTML page contains the following code:
    <embed type=application/x-java-applet;version=1.3
    code=test.AppletTest archive=AppletTest.jar width=800 height=600>
    </embed>I have modified the default policy file C:\jdk1.3\jre\lib\security\java.policy with the following:
    grant {permission java.security.AllPermission;};
    With the above change the applet works when using appletviewer but if I remove this change I get the same AccessControlException as I do with Netscape.
    This suggests that the Java plugin is not using the default policy file. What am I doing wrong / how can I fix it?
    Thanks,
    Neil

    Alon,
    Thanks for the information. The fact that appletviewer and Netscape may be using different security files because of having different java.homes certainly explains the differences I'm experiencing between the two.
    I've now modified C:\Program Files\JavaSoft\JRE\1.3\lib\security\java.policy which now reads as follows:
    grant codeBase "file:${java.home}/lib/ext/*" {
      permission java.security.AllPermission;
    grant {
      permission java.security.AllPermission;
    };but I've not changed C:\Program Files\JavaSoft\JRE\1.3\lib\security\java.security. Unfortunately this still doen't work with Netscape. In your reply you mention changing java.security files - am I making the wrong changes?
    Neil
    Neil

  • Where is java-plugin for IE or Netscape?

    where is java-plugin for IE or Netscape?

    What do you want to do?
    Do want to know where to find the plug-ins in the net or do you want to know where on your computer (what OS) the plug-in is installed etc...
    Regards ADowning

  • Java Plugin 1.3.1 on RedHat Linux 7.1

    I downloaded and installed the Java SDK 1.3.1 for linux.
    When I try to view an applet written in Netscape I get the following error message on the bottom left corner of the browser window:
    ClassdefError javax.japplet not found.
    However, I can see the applet in the appletviewer.
    In order to install the plugin I did the following:
    I removed the old plugin:
    rm -fr $Home/.netscape/.java
    rm $Home/.netscape/plugin/javaplugin.so
    Then, to install the plugin I set the netscape environment variable :
    export NPX_PLUGIN_Path = /usr/java/jdk1.3.1/jre/bin/plugin/ns4/javaplugin.so
    How can I tell whether the netscape 4.7 browser is using this plugin??
    Could someone please tell me what is causing the error?? Please be very specific, I am new to RH Linux.
    Thank You
    Mihir Chokshi
    email: [email protected]

    try to make a link to your java plugin from netscape plugin directory:
    cd your_netscape_dir/plugins
    ln -s /usr/java/jdk1.3.1/jre/bin/plugin/ns4/javaplugin.so try to fid netscape dir in /usr/lib/netscape/ or /usr/local/netscape ..
    Iulian

  • I am using oracle Apps ERP in firefox wherein there is a Java Plugin , This is working fine in 3.5 version but as soon as i am upgrading to the latest version oracle is not working and firefox crashes. I can't upgrade even though i wish to

    We are using Oracle ERP in our company which is a web based ERP system. I am using firefox to work in ERP for convinieince pf working and using internet at the same time. This requires a plugin provided by oracle oajinit.exe to be installed in Plugins it is a JAVA plugin which opens the ERP Screens. This works fine in versions prior to 3.6 version of firefox. However, after upgrading to 3.6 version the forms do not open and firefox crashes. Due to this i am not able to upgrade to the latest version else i'll have to operate the ERP in internet explorer and using firefox for browsing which i do not want. The plugin used for the ERP is "* JInitiator 1.3.1.18 for Netscape Navigator (DLL Helper)"

    Firefox 3.6 needs the Java Second Generation Plugin which comes with newer versions than 1.6.0_03 - update Java, the latest version is 1.6.0_22

  • Steps to create your own self signed certificate with java plugin working

    You need two tools that comes with your jdk which are keytool and jarsigner.
    Steps explain below in detail. Don't use netscape signtool, it will NEVER work!
    * keytool -genkey -keyalg rsa -alias tstkey -keypass 2br2h2m -dname "cn=Test Object Signing Certificate, o=AI Khalil, ou=Java Products, c=AU"
    cn = Certificate name
    o = organistation
    ou = organistation unit
    c = country (first two letters)
    If don't put the -dname, you can fill it line by line.
    The -keypass has to be verify at the end, and you have to wait for it to create the rsa signing keys.
    On NT by default it will put the alias information at D:\WINNT\Profiles\Administrator (if log in as administrator) with the default file called ".keystore". Windows 98 etc, don't know, search for .keystore
    file. When you update it, check for the timestamp change and you know if you at the right spot.
    You can store your alias information via the -storepass option to your current directory you work on, if you don't want to update the default .keystore file?
    The .keystore contains a list of alias so you don't have to do this process again and again.
    Another tip if you want your certificate encryption validity to be more than the default one month is simply
    add the -validity <valDays>, after the -genkey option, to make your certificate usage for encryption to last much longer.
    Note: You MUST use the -keyalg rsa because for starters the rsa encyption alogorthim is supported on ALL browsers instead of the default DSA and the other one SHA. Java plugins must work with the RSA algorthim when signing applets, else you will get all sorts of weird errors :)
    Do not use signtool because thats a browser dependant solution!! Java plugin is supposed to work via running it owns jre instead of the browser JVM. So if you going to use netscape signtool, it starts to become a mess! ie certificate will install, but applet won't start and give you funny security exception errors :)
    * keytool -export -alias tstkey -file MyTestCert.crt
    It will read the alias information in the .keystore information picking up the rsa private/public keys info and
    create your self sign certificate. You can double click this certificate to install it? But don't think this step is needed but maybe for IE? Someone else can check that part.
    If you make a mistake with the alias, simply keytool -delete -v -alias <your alias key>
    If not in default .keystore file, then simply keytool -delete -v -alias <your alias key> -keystore <your keystore filename>
    * Put your classes in your jar file, my example is tst.jar.
    * jarsigner tst.jar tstkey
    Sign your testing jar file with your alias key that supports the RSA encryption alogorthim.
    * jarsigner -verify -verbose -certs tst.jar
    Check that its been verified.
    The last step is the most tricky one. Its to do with having your own CA (Certified Authority) so you don't
    have to fork out money straight away to buy a Verisign or Twarte certificate. The CA listing as you see in
    netscape browsers under security/signers, is NOT where the plugin looks at. The plugin looks at a file called
    CACERTS. Another confusion is that the cacerts file is stored in your jre/lib/security AND also at your
    JavaSoft/Jre/<Java version>/lib/security. When you install the Java plugin for the first time in uses your
    JavaSoft folder and its the cacerts file that has to be updated you add your own CA, because thats where
    the plugin look at, NOT THE BROWSER. Everything about plugin is never to do with the browser!! :)
    * keytool -import -file MyTestCert.crt -alias tstkey -keystore "D:\Program Files\JavaSoft\JRE\1.3.1\lib\security/cacerts"
    Off course point to your own cacerts file destination.
    Password to change it, is "changeit"
    Before you do this step make a copy of it in its own directory in case you do something silly.
    This example will add a CA with alias of my key called "tstkey" and store to my example destination.
    * keytool -list -v -keystore "E:/jdk/jdk1.3/jre/lib/security/cacerts"
    List to see if another CA is added with your alias key.
    Your html, using Netscape embed and Internet explorer object tags to point to the java plugin,
    your own self sign applet certificate should work
    Cheers
    Abraham Khalil

    I follow Signed Applet in Plugin, and it's working on
    my computer. Thanks
    But When I open my applet from another computer on
    network, why it does not work ..?
    How to make this applet working at another computer
    without change the policy file ..?
    thanks in advance,
    AnomYou must install the certificate on that computers plugin. Can this be done from the web? can anyone suggest a batch file or otherwise that could do this for end users?
    I want a way for end users to accept my cert as Root or at least trust my cert so I dont have to buy one. I am not worried about my users refusing to accept my cert. just how do I make it easy for them? IE you can just click the cert from a link, but that installs for IE, and not the plugin where it needs to be.

  • Swing applet does not work in IE using java plugin

    I am using applet-servlet communication in my Applet and also using java plugin 1.3 to open that applet in browser.It is working fine in Netscape 4.7 but not in IE 5.0.
    Problem is It could not get any data from the database.
    If you have any solutions it will be appriciated.
    thanks

    did you find your problem with the IE 6.0
    Java problem.Java(TM) Plug-in: Version 1.4.2_01
    Using JRE version 1.4.2_01 Java HotSpot(TM) Client VM
    I have something simular and was looking for a fix.
    .yavs: Yet Another Vertical Scroller, version 1.2
    (c) 1998 Steve Bassler http://www.westol.com/~bassmstr
    yavs: Yet Another Vertical Scroller, version 1.2
    (c) 1998 Steve Bassler http://www.westol.com/~bassmstr
    yavs: Yet Another Vertical Scroller, version 1.2
    (c) 1998 Steve Bassler http://www.westol.com/~bassmstr
    load: class xms.EntryApplet.class not found.
    java.lang.ClassNotFoundException: xms.EntryApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more

  • ANSWER: HOW TO DETECT Java Plugin from JavaScript

    I created a new topic because the questions about
    how to detect Java Plugin in browsers are scattered
    thoughout this forum.
    Basically you need to employ two approaches for IE and NS.
    In IE you need to try to instantiate a small applet
    (not your production applet) in order to see if browser
    can do it. if the browser can do it, you can make a
    call applet from JavaScript in order to find version of
    JRE (as well as a host of other things).
    In NS you can write a simple JavaScript which will
    interrogate the browser for all plugins installed. Then
    ypu can make a desicion whether to pass execution to
    the next(or generated) page which hosts your applet,
    or ask the user to download/install a plugin.
    I ecourage everybody to host a plugin on your site
    rather leave default link to it which is generated by
    html converter.
    In order to run sample,
    Prerequisites:
    Java Plugin 1.3.
    If you have a different version of plugin,
    substitute hardcoded plugin version in JavaScript for
    value that you have.
    1. compile java file
    2. put class file in the same directory with html file
    3. load html file into the browser.
    4. press "Check Java Plugin.." button
    5. see it work
    6. examine code
    7. uninstall plugin
    8. repeat steps 1 - 4
    9. see it work
    10. install plugin.
    Sample code follows:
    **********************HTML FILE BEGIN***********
    <HTML>
    <HEAD>
    <!-- Generated by Kawa IDE -->
    <TITLE>Detect Java Runtime</TITLE>
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    var browsername;
    function doNetscape()
    for (i=0; i < navigator.plugins.length; i++)
    for (j = 0; j < navigator.plugins.length; j++)
    if(navigator.plugins[i][j].type == "application/x-java-applet;version=1.3")
    alert("You are running Netscape with Java Plugin 1.3.0 - OK");
    return;
    alert("You are running Netscape\nPlease, install Java Runtime Environment 1.3.0");
    function doMicrosoft()
    var applet = document.myApplet;
    if(applet == null)
    alert("You are running Microsoft Browser.\nPlease, install Java Runtime Environment 1.3.0");
    return;
    var version = applet.getJavaVersion();
    if(version == "1.3.0")
    alert("You are running IE, Java Plugin 1.3.0 installed - OK");
    else
    alert("You are running IE, other plugin installed - mybe OK if later that 1.3.0\nYour version: " + version);
    function getJava()
    var applet = document.myApplet;
    if(applet == null)
    alert("Please, install Java Runtime Environment");
    return;
         alert("JRE Version: " + document.myApplet.getJavaVersion());
    function checkJavaPlugin()
         browsername = navigator.appName;
         if(browsername.indexOf("Netscape")!= -1)
              browsername="NS";
              doNetscape();
         else
              if(browsername.indexOf("Microsoft")!=-1)
                   browsername="MSIE";
                   doMicrosoft();
              else
                   browsername="N/A";
                   alert("Unknown browser: " + browsername);
    </SCRIPT>
    <body>
    <Strong>Check Java Plugin</strong>
    <OBJECT id="myApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
         WIDTH = 1
         HEIGHT = 1 >
         <PARAM NAME = CODE VALUE = "DetectPluginApplet.class" >
         <PARAM NAME="scriptable" VALUE="true" >
         <embed type="application/x-java-applet;version=1.3"
              code = DetectPluginApplet width = 2 height = 2 MAYSCRIPT = "true" >
         </embed>
         </EMBED>
    </object>
    <FORM>
         <INPUT TYPE="button" value="Get Plugin Version in IE" onClick="getJava()">
         <INPUT TYPE="button" value="Check Java Plugin in NS and IE" onClick="javascript:checkJavaPlugin()">
    </FORM>
    </BODY>
    </HTML>
    **********************HTML FILE END***********
    ***************APPLET FILE BEGIN***********
    import java.awt.*;
    public class DetectPluginApplet extends java.applet.Applet
         public void init()
              add(new Label("DetectPluginApplet"));
    public String getJavaVersion()
    return System.getProperty("java.version");
    **************APPLLET FILE END************

    Try following java script, it works on new browsers (NS 4+, IE5+). For IE you have to enable 'ActiveX objects creation' in security options.
    var agt=navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
    && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
    var is_ie5up = (is_ie && (is_major == 4)
    && ( (agt.indexOf("msie 5.0")!=-1)
    || (agt.indexOf("msie 5.5")!=-1)
    || (agt.indexOf("msie 6.0")!=-1) ) );
    var pluginDetected = false;
    var activeXDisabled = false;
    // we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
    if(is_nav4up) {
    // Refresh 'navigator.plugins' to get newly installed plugins.
    // Use 'navigator.plugins.refresh(false)' to refresh plugins
    // without refreshing open documents (browser windows)
    if(navigator.plugins) {
    navigator.plugins.refresh(false);
    // check for Java plugin in installed plugins
    if(navigator.mimeTypes) {
    for (i=0; i < navigator.mimeTypes.length; i++) {
    if( (navigator.mimeTypes[ i].type != null)
    && (navigator.mimeTypes[ i].type.indexOf(
    "application/x-java-applet;jpi-version=1.3") != -1) ) {
    pluginDetected = true;
    break;
    } else if (is_ie5up) {
    var javaVersion;
    var shell;
    try {
    // Create WSH(WindowsScriptHost) shell, available on Windows only
    shell = new ActiveXObject("WScript.Shell");
    if (shell != null) {
    // Read JRE version from Window Registry
    try {
    javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
    } catch(e) {
    // handle exceptions raised by 'shell.regRead(...)' here
    // so that the outer try-catch block would receive only
    // exceptions raised by 'shell = new ActiveXObject(...)'
    } catch(e) {
    // Creating ActiveX controls thru script is disabled
    // in InternetExplorer security options
    // To enable it:
    // a. Go to the 'Tools --> Internet Options' menu
    // b. Select the 'Security' tab
    // c. Select zone (Internet/Intranet)
    // d. Click the 'Custom Level..' button which will display the
    // 'Security Settings' window.
    // e. Enable the option 'Initialize and script ActiveX controls
    // not marked as safe'
    activeXDisabled = true;
    // Check whether we got required (1.3+) Java Plugin
    if ( (javaVersion != null) && (javaVersion.indexOf("1.3") != -1) ) {
    pluginDetected = true;
    if (pluginDetected) {
    // show applet page
    } else if (confirm("Java Plugin 1.3+ not found, Do you want to download it?")) {
    // show install page
    } else {
    // show error page
    }

  • Netscape using plugin doesn't display Japanese characters in a tree node

    Hi,
    I have a problem displaying a swing tree node name in Japanese. The problem only occurs on Netscape browsers. When I run the same applet with Internet Explorer, all the Japanese displays correctly. Now, with Netscape, the node name is displayed in little rectangle characters but the tooltip is displayed in Japanese. I don't believe I have any problem with the Java code because it works with IE.
    I am using the java 1.3.1_01 plugin on a Windows NT machine that has a Japanese OS. I've also installed Japanese versions of Netscape. Also, Netscape is able to display my help files in Japanese correctly, so I am wondering if the problem is with the java plugin.
    Any clues?
    Many thanks

    Found the problem. I set a font type of Arial. It's best to set the type to MS Gothic, or dont' set it at all so the system default font is used.

  • How to set FOCUS on applet (java-plugin)

    I wrote applet using Java 1.3.1, using swing clasess.
    I use java-plugin, defined in <object ..> and <embed ..> tags as described in documentation,
    with MAYSCRIPT parameter and ID and NAME parameters defined.
    How to set up focus on this applet through JavaScript?
    I have tried:
    document.embeds[0].focus()
    document.applets.MyApplet.focus()
    document.objects.MyApplet.focus()
    document.objects[0].focus()
    document.MyApplet.focus()
    But nothing works in my IE5.x or NC4.7. Applet itself works fine.
    Is some special methods need to be defined in JApplet to catch the focus?
    Thanks for any advice.

    I wrote applet using Java 1.3.1, using swing clasess.
    I use java-plugin, defined in <object ..> and <embed
    ..> tags as described in documentation,
    with MAYSCRIPT parameter and ID and NAME parameters
    defined.
    How to set up focus on this applet through
    JavaScript?
    I have tried:
    document.embeds[0].focus()
    document.applets.MyApplet.focus()
    document.objects.MyApplet.focus()
    document.objects[0].focus()
    document.MyApplet.focus()
    But nothing works in my IE5.x or NC4.7. Applet itself
    works fine.
    Is some special methods need to be defined in JApplet
    to catch the focus?
    Thanks for any advice.With IE you should try the following:
    <OBJECT id='MyApplet' ...
    document.MyApplet.requestFocus();
    This worked fine for me, even without specifying additional "MAYSCRIPT" or "scriptable=true" tags. Obviously this construct managed to call the public Java method "requestFocus()" from JavaScript.
    Maybe something similar would also work for Netscape. I felt no need to do this when running in Netscape, because the Netscape browser handled focus management without problems.
    For IE I tried to workaround a problem mentioned by several people in this forum: The focus will not be regained by an applet when the user switched form IE to another application and then returns back to the browser window which contains the applet.
    Unfortunally the following code fragment worked only partially well:
    function activated()
    if (isIE)
    document.MyApplet.requestFocus();
    return true;
    window.onfocus = activated();
    OnFocus is invoked only each second time when the browser window gains back focus.
    I'm still looking for a real solution, so I'd appreciate if anybody could come up with one.
    Hope this helps a bit
    Bernd

  • JavaScript to Java with the Java Plugin, anyone?

    The java.sun.com web site seems to be teeming with docs on how to access JavaScript from Java, and the Netscape site seems to have plenty of docs on how to access Java methods from JavaScript using the browser's own JRE.
    But can one use JavaScript to access methods of a Java applet running under the Java Plugin? And if so, how?

    all the public methods and fields of an applet are exposed to javascript. In the <applet> tag, set...
    <applet ...otherinfo... mayscript></applet>, or
    <applet ...otherinfo... mayscript="true"></applet>
    I think the latter version is safer to use, as I think IE has issues if you just use the mayscript tag without the "true" value.
    So if that is set, in javascript all you have to do is address the applet, and call any of its public fields/methods. (Actually, I know you can call all public methods and I think you can call all the public fields as well...)
    var applet = self.document.applets[0];So now you can call all the public members, such as...
    applet.start();
    applet.stop();
    applet.myPublicFn1();
    applet.myPublicFn2(arg1, arg2);
    var val = applet.pubField1;etc.
    Note that if you're using Java2 (swing) thru the object/embed tags rather than just using the applet tag, things don't work that smoothly. I tried once and the applet wasn't actually found in the applets collection of the document. I tried finding the 'applet' object but had no such luck...
    Hope that helps.
    Good luck.

  • Javascript to applet calls with Java Plugin

    Hello,
    I'm working on getting existing applets to work with Sun's Java Plugin (v 1.3.1_03). I'm not sure how to modify calls to the applet from JavaScript. For example:
    document.applets[0].getClientHomeFromEnvironment();
    This works fine using the regular browser VM in IE or Netscape, but is not valid when using Sun's Plugin. I found the following in the Developer FAQ:
    Q: Does Java Plug-in support Java-JavaScript communication?
    A: Yes, Java Plug-in supports basic, bidirectional Java-JavaScript communication. The following, however, is a known incompatibility.
    In the Microsoft implementation, applet methods and properties exposed in JavaScript are exactly the same as the methods and fields in the applet object. In Java Plug-in, an applet's methods and properties are exposed in JavaScript through JavaBeansTM introspection, which treats the applet's fields in a different manner than the Microsoft VM. Therefore, JavaScript accessing fields in an applet object may not work the same when run on JRE/Java Plug-in.
    But it's still not clear to me how I would go about calling the applet. Has anyone done this successfully?
    Thanks,
    -Dave Meier.

    Yes and no....
    I'm using the internal browser JVM when the user has NS < 6.0 and IE < 5.0. But.. if they have NS 6.0+ or IE 5.0+ and have the browser configured properly, it hands off to the plugin. That does work.
    If you must use the OBJECT or EMBED tags... Your best bet are the release notes for the plugin to see what they say about Java-JavaScript support. You could start here...
    http://java.sun.com/products/plugin/1.3/enhancements/oji.html
    JZ

Maybe you are looking for

  • Does composite primary key in BMP really work?

    Here's a issue. I have a bean called CalendarEvent which uses name, startTime and endTime in composite fashion for primary key. I have a primary key class defined as well. Now I have a ejbFindByUser method which takes in a name and creates a collecti

  • Count and sum function

    Hi, I want to get sum of a column, but it is giving wrong values when using sum and count functions. please help. But in actual excel value is different.

  • SPRY data_region

    Is there any way to populate spry data_region using oracle/mysql recordset instead of using xml data file? Remember i am using php to achieve this task.

  • Windows 7 won't fully boot after recovery to out-of-box state

    I have reinstalled Windows 7 by holding down the 0 key on boot. The installation finished, but when windows booted into the setup screen for the first time, it crashed halfway through the driver installation process. When the laptop rebooted, it went

  • Database cache remote table

    Does anyone know if database caching can work with a remote database via a link. My app server is going to work with an 8i database. Our dba is going to do a dblink to an 8.0.5 database. I want to cache data from the 8.0.5 database to the appserver.