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

Similar Messages

  • 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.

  • How to setup Analyzer 7.0.1 with Java plugin 1.4.2_03?

    Hi,<BR>I use Hyperion Analyzer 7.0.1. The default Java Plugin is 1.3.1_09 and in my environment it is working without any problems.<BR><BR>In my company there are other non-Hyperion applications that requires java 1.4 or higher.<BR><BR>I noticed that Java Plugin 1.4.2_03 is also available on Analyzer installation CD. So I installed this java version on client computer, but when the applet is started it opens the java 1.3 installation window.<BR><BR>I probably need to configure some settings on Analyzer server computer. What should I change on server site of computer to have java 1.4.2_03 (or higher if posible) accepted on client computer?<BR><BR>Thanks,<BR>Grofaty

    In pdf book "Hyperion Analyzer Release 7.0 Administration Guide - P/N: D750770000) on page 129 there is instruction (please see bellow).<BR><BR>But in my Analyzer.jsp file are "<hya:" template tags. When I try to replace the template tags with the ordinary text described in bellow instructions I got error from Tomcat app. server - unable to compile jsp file.<BR><BR>How to replace clsid number of java JRE to get working a java 1.4 version?<BR><BR>Is there any file where <hya: are specified and I could change the "<hya:" variables with constants?<BR><BR>Thanks,<BR>Grofaty<BR><BR><BR>===========================================<BR>Configuring Different Java Plug-in Versions<BR>===========================================<BR><BR>The Hyperion Analyzer Java Web Client and Administration Tools Client are<BR>configured to use the Sun Java Plug-in 1.3.1_09. Administrators can update the<BR>Sun Java Plug-in versions by editing the Analyzer.jsp and Administrator.jsp files<BR>static versioning statement. This mandates the loading of the specified version of<BR>the Sun Java plug-in.<BR> To edit the Analyzer.jsp and Administrator.jsp static versioning statement, perform<BR>the following tasks:<BR><BR>1. Open the Analyzer.jsp file using a text editor.<BR><BR>2. Search for the static versioning statement class ID, clsid:.<BR>The current class ID value is as follows:<BR>clsid:CAFEEFAC-0013-0001-0004-ABCDEFFEDCBA<BR><BR>3. Edit the clsid value, to the desired Sun Java Plug-in version.<BR>Alphabetic characters at the beginning and end of the string are set by Sun. Do<BR>not change these characters. The first two sets of numeric digits indicate the<BR>Sun Java Plug-in version. The third set of numeric digits indicates the patch<BR>number. For example, the clsid value for the 1.3.1_10 Sun Java Plug-in is as<BR>follows:<BR>clsid:CAFEEFAC-0013-0001-0010-ABCDEFFEDCBA<BR><BR>4. Save your changes to the jsp file.<BR><BR>5. Repeat all of these steps for the Administrator.jsp file.

  • How to get applets running with Java Plug-in on Win but also on Mac OS X???

    I've converted to the use of Java Plug-in for my applets, but I need to have those same applets executable from browsers on Mac OS X platform. Surely this has been done, but I don't see how. The browsers I've tried on Mac OS X (Netscape, IE) don't seem to recognize the <OBJECT> tag used for the java plug-in. I've seen no news about the Java plug-in being ported to Macs. How can one get the same applet to run with the Java plug-in on Windows browsers, and also to run with at least one of the common browsers on Mac OS X? Any help would be SO much appreciated!

    Those ten dukes look good to me. But the passing of fifteen months has me thinking you've probably moved on. In any case, here's my effort.
    I've been through a trial trying to get my applet, developed with 1.4.1_03, to run on my Mac OS X v.10.2.6 in multiple browsers. I'm posting my results here. Comments and feedback are welcome.
    JVM support for 1.4.1 is limited to the Safari browser. All other browsers running in Mac OS X that I've tried ( Camino, Opera, Internet Explorer, Mozilla ) are using the 1.3.1 plugin. According to a bug report by Mozilla on this topic ( see Bugzilla Bug # 197813 http://bugzilla.mozilla.org/show_bug.cgi?id=197813 )
    with the release of Apple's version of Sun's Java 1.4.1 the applet programming model has changed, and only Safari has adapted with this change. Other browsers, according to the report, could not because of a lack of documentation. The use of the MRJCarbon plugin offered by Mozilla (here - http://www.mozilla.org/oji/MRJPluginCarbon.html) only allows Mozilla to use the J 1.3.1. And I have not found any information on the Microsoft site about how to get IE 5.2 to recognize the newer version of Java.
    Regarding the use of the OBJECT tag in Safari, it is a matter of debate. A current post on this topic exists in the Applet Development forum:
    http://forum.java.sun.com/thread.jsp?forum=421&thread=441002
    In my experience, I have not been able to determine that Safari v1.0 recognizes the OBJECT tag. My experience is that the APPLET tag is required to run applets in Safari. The Bugzilla report echoes the problem with the BadMagicNumber error that can arise in Safari. Nonetheless, I enjoy Safari and I enjoy Mac OS X.

  • URL problem with Java Plugin 1.4.1

    To whom it may concern:
    We are developers working in java and we are experiencing a problem with the new Java plug-in (version 1.4.0) that are not able to solve ourselves:
    We have an applet that needs to read URL�s. When we run the applet locally, this URL is:
    "file:/C:/proof/hunter%20media/images/classic.ski". When we try to open an stream to this URL it doesn't work. The message that we obtain is:
    access denied (java.io.FilePermission C:\proof\hunter media\images\classic.ski read)
    but all the permissions are OK. Also, if we remove the whitespace from URL the applet works OK.
    We have tested the applet in Windows XP with Netscape 7.0, Internet Explorer 6.0.2 and tha Java plugin version is 1.4.0.
    Is there any problem with the whitespaces in URL opened locally?
    Please advice,
    Kind regards,
    Fernando

    Doesn't a url require "file://....?

  • URL problem with Java plugin 1.4.0

    To whom it may concern:
    We are developers working in java and we are experiencing a problem with the new Java plug-in (version 1.4.0) that are not able to solve ourselves:
    We have an applet that needs to read URL�s. When we run the applet locally, this URL is:
    "file:/C:/proof/hunter%20media/images/classic.ski". When we try to open an stream to this URL it doesn't work. The message that we obtain is:
    access denied (java.io.FilePermission C:\proof\hunter media\images\classic.ski read)
    but all the permissions are OK. Also, if we remove the whitespace from URL the applet works OK.
    We have tested the applet in Windows XP with Netscape 7.0, Internet Explorer 6.0.2 and tha Java plugin version is 1.4.0.
    Is there any problem with the whitespaces in URL opened locally?
    Please advice,
    Kind regards,
    Fernando

    Hi Fernando,
    What do you mean u removed the whitespaces. I am actually trying to work my way around a similar problem. I am trying to access a URL from a locally loaded applet. But i get a security exception too.
    http://osmv.soe.umich.edu/blueskies/kgs99/kgs99.txt
    how do i strip it of whitespace?
    Thanks,
    Shantanu

  • JavaScript to Applet call freezes the Browser

    Hi,
    I am using javascript to applet communication to do some processing in my current project. The processing done in the applet is little heavy, whenever applet is processing the request, Browser freezes and user is not able to work with browser anymore. Even if you try to open new browser window its response is very slow.
    Basically browser window is not able to refresh its contents and appears to be freeze to the user while the applet is processing the request.
    is anybody faced this ( javascript to applet communication) problem earlier?
    Any solution/workaround to this problem?
    Thanks,
    panyog

    Martin,
    Thanks for your reply. whatever you have mentioned is correct. Applet is eating up the resources. But the problem is browser window is not getting refreshed appears
    to be freeze.
    Following are the details of the scenario
    1) Browser opened with mutilple processing option to the user.
    2) User selects some of them for processing and call process.
    3) here we have used javascript call to send for processing to the applet .
    Here javascript call to Applet, one by one getting processed.
    4) Applet starts processing, displays that an options
    are getting processed, please wait. ( here the window appears closes.)
    5) Once the window is gone, the browser which was previously
    opened is freeze . All the text and all are lost nothing is visible.
    Applet is still processing further requests, for user the browser is freeze.
    User try to open another browser window, Window opens up but it is
    really slow.
    How can we refresh the browser window?
    javascript reload does not work as it tries to process the option again?
    from applet we cannot refresh the Browser window...
    Is there any way we can it?
    Thanks and Regards,
    panyog

  • Forms Web application is not working on FireFox Browser-with java plugin

    Hi All,
    We are running custom build forms application using forms 10g and application server 10 g Rel 2. We are using Java Plug-in 1.5.0_06. The application is working fine before recent update from firefox .Now it's not working and keep on asking additional plug in required and taking to java.sun.com for installing the plug in. Even after installing when we access the application it will do the same thing. I tried uninstalling the firefox with the older version and with diffrent java plugin versions.. but the problem still there.. any help will be mush appriciated...
    Thanks...
    Edited by: rkadaru on May 5, 2010 1:57 PM

    plugin and webstart are not yet available in 64bit jre distributions from Sun.
    These are targeted to 6u12 or there abouts.
    /Andy

  • Sending data during the call with java enabled mobile devices

    hi every one ,
    this is the problem :
    i have 2 mobile phone with java enabled os , i want to call (dial) from phone1 to phone2 with java code , (this will be done by platformRequest("tell:123456"))
    AND then i want to for example press key '1' in phone1 during the call some program send this key to phone2 and in phone2 i want to switch this key and understand that was key '1' ...
    how can i send this data for example a key pressed event to another phone with J2ME ???
    i am developing it with netbeans Mobile Application by the way ...
    could you please tell me your opinion and help me in this ,
    Thanks a lot ,
    Omid

    Hi Kanagaraja L,
    Thanks for you response.
    No I haven't created Created RFC Destination , this RFC destination will be of my JAVA system ???.
    I have tried creating the partner logical system in WE20 and dine the following steps:
    1. Partner No.   IDES800     Ides 800 System - Sender System
        Partn.Type    LS          Logical system
    2. The tab Post processing : permitted agent is filled with default parameters.
    3. Then in the outbound parameter table control I have pressed the add record button and got a new screen in
        which I have made the following entry :-
      Partner No.           IDES800        Ides 800 System - Sender System
      Partn.Type            LS             Logical system
      Partner Role          LS             Logical system
        Message Type      SYNCH                            ALE:Dummy Message Type for De
        Message code
        Message function
    Under tab Outbound options :
    Receiver Port  = A000000008  (This I have selected from F4 help)
    Basic type = SYNCHRON
    Saved it with the above data.
    Now I am not able to understand how to do the things you have mentioned in 3rd step in your reply.
    What are all the things I have to do kindly tell , as I am very new to Idocs so don't have much knowledge.
    Edited by: Rachit Khanna on Dec 7, 2009 1:49 PM

  • Dreamweaver CS3 will not launch in OS10.7.5 even with Java plugin.

    I installed the Java runtime environment, thinking that would allow me to launch Dreamweaver CS3 in my new OS, but no. I get a blank alert with ! and no message, and no program. Any suggestions? Do i need to do something to get the Java plugin to connect with Dreamweaver??
    Thanks!

    Did you followed the steps mentioned in http://helpx.adobe.com/x-productkb/global/install-java-jre-mac-os.html ?
    If so, restart your computer and then try installing DW.

  • Mouse navigation don't work with Java Plugin.

    I'm using forms 10g (10.1.2.0.2) with a Java Plugin 1.5.09.
    The mouse navigation limit seems to be broken and I can't use the mouse to navigate.
    The same form using jinit works fine.
    Is there any reason ? Is it a bug ? Any workaround ?
    Tks
    Tullio

    I'm having the same problem
    Trying to switch from Jinitiator to JRE 1.5.0_12
    Forms 10.1.2.0.3
    All the forms come up, but I cannot select a field with the mouse. When I click in a field, the cursor moves momentarily to the new field, but bounces back to the prior field as soon as I release the mouse button. This seems to be happening in every form.
    Can anyone help?

  • GDI object leak using an applet with Java Plugin 1.4.2_02

    We have an application where we use an applet to draw some graphs. The applet has an interface to update the graphical data using Javascripts. Now duing every graphical update of the graph there a leak of the GDI objects. Over time the display on the machine gets frozen due to lack of resources.
    This problem is happening with IE 6.0 using Sun Java Plug-in 1.4.2_02.
    Has anybody else seen this problem. Is there any work aorund for this issue.

    The code is not leaking. This has been verified.
    The problem has been fixed in 1.5.0 (5.0) Beta 2 version but I don't know then final release of this is going to be. Also using a beta version now is not an option.
    The 1.4.2_04 did not fix the GDI leak that I am seeing, I was hoping it would.

  • Do I need to pass a applet test with Java before the Flash player will function?

    I have downloaded the unstall and install programs for Adobe Flash Player and followed all the steps poster, "eidnolb" noted to prior poster greenie41180 on March 6th,  2010, 8:05PM.   The flash player test did not work.   I also do not see applets, when I use the latest version of Java on an applet test.    I might try reinstalling IE8, or going to IE7 and reinstalling Flash Player.  Gawd!  hours have been used, just trying to get Flash Player going so I can resume watching the tutorials at Mathtutordvd.com.   
    What other troubleshooting steps can be taken?   I have tried everything eidnolb suggested in prior posts.
    Hello everyone, When I try to download the Flash player I get the error message listed above.    I turned off the firewall and virus modes on my TrendMicro protection program, when downloading the player.     I already have Java 6, update 18 in the system.   I restarted the computer.  I also adjusted the configurations for Javascript and ActiveX under the "Tools" menu for the Security and Advanced tabs of Internet options.  I have Windows XP, service pack 3, with Internet Explorer 8.  
    Also, I tested the recent, most updated program, Java and I still can not see an applet.    I have spent 7 or more hours on this.  I thought initially this process was going to be straight forward.     I desperately need this Flash player so I can learn math at the streaming video site called,  Mathtutordvd.com       Oh! gosh maybe someone here can help me help myself by giving me more troubleshooting steps.  I did follow Adobe's troubleshooting steps, but I still get the same, above error box with,  MSXML2.XSL Template 3.0 (Original exception: undefined)
      I hope, eventually to watch the streaming site, once this Flash Player is loaded.   I really do not understand what is going on here.  Thanks for your help.
    Information:   Windows\System32\Macromed\Flash
    These items are in the Flash folder:
                                                    Flash10e.ocx    version 10.0.45.2
                                                    Install text document
                                                    Uninstall_activeX  10.0.45.2
                                                    FlashUtil10e  Adobe Flash Player Helper  10.0.45.2
                                                    Should not FlashUtil10e be listed as FlashUtil10e.exe  ???
                                                    FlashInstall text document
    Genuinst   Microsoft application file  version
    6.0.2800.1531                                                                            KB913433 Setup Information 
                                                                                                           This is the Java version and also, these are listed and enabled in the “Manage add-ons” for Internet Explorer 8:           C:\Program Files\Java\jre\bin
    Java Plug-in 1.6.0_18  ActiveX control
    File: npjpi160_18.dll  version:  1.6.0.18
                                                    Java™Plug-in 2 SSV    version: 6.0.180.7  , file: jp2ssv.dll
    JQSIEStartDetectorImpl  Class  version:  6.0.180.7,  file:                               jqs_plugin.dll   for  program Files\Java\jre6\lib\deploy\jqs\ie
    Adobe PDF link Helper, version 9.0.0.332
    File:  AcroIEHelperShim.dll
    For C:\Program Files\Adobe  the listed files are:  
                                                    Reader 9.0
                                                    Acrobat.com
                                                    Photoshop 7.0
    Also,  under common files:   C:\Program Files\Common Files\Adobe\Acrobat\ActiveX the following files are present:
                            Pdfshell.dll
                            AcroIE HelperShim.dll
                            AcroPDF.dll
                            AcroIEHelper.dll
    There is also a file called Adobe AIR under the Common Files category.
    Next,  there are some Java undate files listed as:  C:\program Files\Common Files\Java\Java Update
    Also, listed in the “Manage add-ons”  is:  Shockwave Flash Object,  Flash10e.ocx,
    which is enabled.  
    When I checked the C:\program Files  I reviewed all listed folders and did not see folders named,  Adobe Flash Player 10 ActiveX,  or  Adobe Flash Player 10 plug-in.    The only folder found label with Adobe, was the prior mentioned folder,  Adobe containing Reader9.0,  Acrobat.com, and Photoshop7.0.

    Hi, May I suggest that you read your previous 3 threads that have been responded to?
    You need to stop starting threads, this is the 4th one. You need to stop copying and pasting from the first thread to the new threads that you are starting. It serves no positive purpose.
    eidnolb

  • How to make sure an applet runs with Java 5?

    Hi all,
    First let me say thanks for all the help in the past. You've help me go from noob to intermediate noob. I've just about finished my first applet game which can be checked out here .
    Now I've been reading about problems with mac and 1.6. (note it works on Linux). I want to make sure that it runs fine and of course I don't own a mac. So I downloaded the 5 JDK. Selected it as the java platform in Netbeans, compiled and it ran fine.
    Questions:
    Do I have to always use 1.5 to compile and perhaps set it as default?
    Since it works in 1.5, do I compile it with 1.6 and just upload?
    I'm worried I'm not testing it correctly. I mean if I have both 1.5 and 1.6 installed on my machine, how to I make sure the applet is only using 1.5 to run?
    Thanks
    Darrin

    corlettk wrote:
    I haven't got a clue RE your problem other than for max-portability you should compile with [-target 1.5|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html].
    I must say I'm impressed, except I suspect my PC must be substantially faster than any of your test platforms... can you throttle it to CPU performance somehow? Or maybe it's just that my reflexes aren't what they once where.Thanks.
    There seem to be two issues. The first is what people are using. This web stats shows pretty poor penetration of 1.6.
    [http://www.statowl.com/java.php|http://www.statowl.com/java.php] Penetration: 54% with JRE1.6 + 19% with JRE 1.5. Total 73%.
    The second is I've read that mac and 1.6 do not get along except on a 64bit platform.
    So for applets there is not much choice but to compile on 1.5 for the broadest user base. I guess the good news is 1.4 and earlier are almost non-existent.
    Edited by: Darrin.A on Apr 27, 2009 8:11 AM

  • OPEN_FORM with Java Plugin x Jinitiator

    Hi
    Why the Java Pluing is not working with OPEN_FORM below, When I open one big form after this the aplication just stop to work, I click the menu is not work, nothing nothing to work.
    And with Jinitiator all work fine.
    vnMsg_level := name_in('system.message_level');
    copy('10','system.message_level');
    OPEN_FORM(vsNome_programa || '.fmx',ACTIVATE,no_SESSION,NO_SHARE_LIBRARY_DATA,vpId);      
    copy(vnMsg_level,'system.message_level');
    regards
    Marcos

    This is not the kind of problem that lends itself well to a forum like this one. I have never seen this be a plug-in specific problem and I would be very surprised if it turned out to be. Please call Oracle Customer Support and ask them to analyze your problem.

Maybe you are looking for