Developing applets using ocf

Hello
The wallet demo is a frame window based application using swing
We wanted an applet version of the same
So we changed the extends frame part to extends JFrame
But there are security exceptions which are thrown
So we refered the programmers guide for OCF
But it discusses only for java platform versions 1.1 and 1.2
It is mentioned that the security models are changing
Where do we get information on how to develop applets using OCF framework for java platform 1.3
Are there some examples for the same
Thanks in advance
Regards
Kumar

Hello
Thanks once again
But what are the resources that the applet is trying to access?
What are the permissions to be given.
Any small examples could be given
Infact now we are able to run it in appletviewer but not using IE.
The exception thrown is
java.security.AccessControlException access denied java.io.FilePermission images/initialize.gif read
So what permissions to set and where
Is it possible to grant all permissions to start with
policy.grant(All)
Are there seperate permissions so that one directory alone or a file alone is accessed
Thanks once again
kumar
It's related to J2SE not Java Card.
Applets run in a sandbox by default, whic offers very
little access to resources of the machine it's running
on. It's a security feature that prevents your machine
from very easily being compromised. To set outside
that sandbox requires changes to the java.policies and
java.security.policies, and certificates.

Similar Messages

  • Signed Applet - Using same alias while development

    Hi,
    I am working on Embedded Java Signed Applet. My applet using the TCP/IP thus required to load each time to my Lantronix XPort.
    The problem is, every time I change something in the applet, I need to run the following commands again and finally load to Lantronix XPort.
    And every time, I required to change the alias name i.e. signapplet17 in the following commands.
    Is there any easy way while developing the signed applet
    e.g. we can use the same alias name each time i.e. signapplet1 ( I reached to signapplet17)
    Or we can avoid the following commands while developing.
    jar cmf mainClass.txt DataMain.jar *.class
    : Generate key pairs
    keytool -genkey -alias signapplet17 -keystore mykeystore -keypass mykeypass -storepass mystorepass
    : Sign the JAR file
    jarsigner -keystore mykeystore -storepass mystorepass -keypass mykeypass -signedjar SDataMain.jar DataMain.jar signapplet17
    : Export the public key certificate
    keytool -export -keystore mykeystore -storepass mystorepass -alias signapplet17 -file mycertificate.cer
    Thanks.

    This is my code that i use to read the graph:
    private Graph<Integer, Integer> loadGraph(int year, String type) {
         String graph_dir = ProjectDir.data_dir + "input/Network/vt_kn." + year + "-" + year + "/";
         String graph_name = "vt_kn." + year + "-" + year +".intern." + type;
              Graph<Integer, Integer>graph = new UndirectedSparseMultigraph<Integer, Integer>();
              try{
                   GraphMLReader<Graph<Integer, Integer>, Integer, Integer> gmlReader
                        = new GraphMLReader<Graph<Integer, Integer>, Integer, Integer>();     
                   gmlReader.load(graph_dir + graph_name +".graphml", graph);               
              } catch (Exception e) {
                   e.printStackTrace();
    System.out.println("loaded: " + graph_name);
    return graph;
    public class ProjectDir {
         public static final String data_dir = "F:/Apache/Tomcat 6.0/webapps/ROOT/app/Data/";
         public static final String script_dir = "../Script/";
         //F:/Apache/Tomcat 6.0/webapps/ROOT/VT/data/
    Could you tell me how i could change this code so that i can load from a url instead of a file?

  • Memory leak with 1.6.0_07 in applet using Swing

    Java Plug-in 1.6.0_07
    Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
    Windows XP - SP2
    I have a commercial application that has developed a memory leak with the introduction of the latest plugin. The applets chew up memory and eventually freeze. They did not before. Using jvisualm I see a build up of native arrays, primarily int[][] and char[]. I'm still investigating. Anyone have a similar experience?
    The Applet uses a swing interface, uses buffered images and swing timers, and regularly performs http connections to the server which result in actions via the SwingUtil.invokeLater() method.

    I am Using Internet Explorer Browser Version 6.0.Huge security hole.
    Its not throwing Error / Exception Wrap a try/catch at the highest level possible.
    Catch 'Throwable'. And log/display it somewhere.

  • Question - applet using JMF for playing .mov

    I develop an applet using JMF for playing .mov. It works fine, and the applet starts normally. Even my applet works fine from other computers in our LAN (The applet runs ok without JMF). But only on one PC it doesn't work and I get the following message
    Failed to configure: com.sun.media.PlaybackEngine@a7c45e
    Bad header in the media: moov atom not present
    Error: Unable to realize com.sun.media.PlaybackEngine@a7c45e
    FATAL ERROR: Failed to realize: failed to parse the input media.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler" java.lang.Error: Failed to realize: failed to parse the input media.
    at PlayerApplet.Fatal(PlayerApplet.java:201)
    at PlayerApplet.controllerUpdate(PlayerApplet.java:191)
    at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
    at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
    at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
    at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
    My html:
    <html>
    <head><title>PlayerApplet</title></head>
    <body>
    <applet code="PlayerApplet.class" archive="fobs4jmf.jar, customizer.jar, jmf.jar, mp3plugin.jar, sound.jar, multiplayer.jar, mediaplayer.jar" width=640 height=510>
    <param name=file value="safexmas.mov">
    </applet>
    </body>
    </html>
    Anyone can help me?
    Thanks for your time

    It started to work but I had to install fobs4jmf on the client computer.
    And put .dll to windows/system33 directory. But how can I play video using applet in browser without installing any software on the client machine?

  • Best IDE for developing Applets,Servlets,JSP

    Hi,
    I'm looking for a little bit of advise. I have been developing prototypes using Apache Tomcat. Now I need to go into a full development phase, and I need an IDE to help speedup my work, especially when it comes to debugging applets and servlets. So the following are my questions:
    1. What is the best IDE to use in conjunction with Apache Tomcat? Does JBuilder, for example, fit this bill?
    2. Outside of Apache, I believe there is for example IBM's Websphere, which includes an IDE and a Servlet/JSP container. Which is the best of these packages?
    Thank you for your help.
    Miguel

    Check out NetBeans 3.5 at www.netbeans.org

  • Problem while I try to run Applet using Appletviewer

    Hi,
    I have developed a simple Applet using JDeveloper 1.1, here I am
    using a Dataset, a QueryDataSet and a grid.
    When I run the Applet within JDeveloper it runs just fine, but
    when I use the Appletviewer, the Applet starts of well but gives
    the following error:
    "borland.jbcl.dataset.DataSetException: Operation cannot be
    performed on an open DataSet"
    Please let me know what I am doing wrong.
    Thanks,
    Prag.
    null

    This may be a problem with JDK inconsistency problem. Make sure
    your appletviewer IS Java 1.1 compliant. Also, have you properly
    deployed your applet to a jar file?
    Here are the instructions for deploying a database applet:
    Hope this helps..
    -Chris
    Task 7: Deployment
    The following requirements apply when deploying a database
    applet:
    The database must be on the same server as the Web Server (or use
    a connection manager).
    Must have a JDK 1.1 compatible browser, such as Netscape 4.0.4 or
    Internet Explorer 4.0.
    Creating the Java Archive (.jar) file
    Select File|New
    Click the Deployment tab
    Double-click the Simple Archive Profile icon.
    The Simple Archive Profile wizard (SAP wizard) is displayed.
    On the Welcome page, click Next.
    On page one of the SAP wizard, enter or browse to set the Archive
    Path. Set the name of the jar to db_applet.jar.
    Click Next.
    Page two displays the names of all files in your project. Accept
    the default value of deploying all of the files and click Next.
    On page three, Dependencies, shift-click each item in the list
    "List items that you do not want to appear in the archive to
    select them all.
    Click Remove.
    In most cases, developers prefer to ship only their own classes
    in the .jar file, with separate .jars that store common files
    used by all of their Java programs. For the sake of simplicity,
    you are going to create a .jar file that includes all of the
    classes necessary to run your applet. By removing all of the
    libraries, you indicate that no classes should be omitted from
    your deployed .jar file.
    Click Finish.
    Deploying the applet
    Using a file manager, copy the db_applet.jar file you have just
    created to the Web Server.
    Copy the tutorial.EmpApplet.html file to the same directory as
    your .jar file.
    The tutorial.EmpApplet.html file can be found in the project
    directory (by default, the \myprojects directory under the
    JDeveloper root directory) or you can extract the file from the
    .jar using any PK-ZIP compatible file compression utility.
    Using any text editor, modify the <APPLET> tag in the
    tutorial.EmpApplet.html file to include an ARCHIVE tag that
    references your .jar file. Your <APPLET> tag should include this
    information:
    <APPLET CODEBASE = "." CODE = "tutorial.EmpApplet.class"
    NAME = "TestApplet" WIDTH = 400 HEIGHT = 300 HSPACE
    = 0 VSPACE = 0 ALIGN = middle ARCHIVE =
    "db_applet.jar">
    To test the applet, open the tutorial.EmpApplet.html file through
    a web server using a Java 1.1 enabled browser.
    Congratulations! You have completed your first database applet.
    You created a program that queries data from Oracle tables,
    displays the data in data-aware controls, allows for viewing and
    editing, displays status messages to a StatusBar, and includes a
    NavigatorControl component.
    Prag Ratra (guest) wrote:
    : Hi,
    : I have developed a simple Applet using JDeveloper 1.1, here I
    am
    : using a Dataset, a QueryDataSet and a grid.
    : When I run the Applet within JDeveloper it runs just fine, but
    : when I use the Appletviewer, the Applet starts of well but
    gives
    : the following error:
    : "borland.jbcl.dataset.DataSetException: Operation cannot be
    : performed on an open DataSet"
    : Please let me know what I am doing wrong.
    : Thanks,
    : Prag.
    null

  • Develop applet

    i am new to java
    i need to develope java applet
    can i develope java like .net application mean drag button n drop on form and write code on click event
    for .net application Visual studio
    for applet ?
    i just want to develop applet oni
    so i not prefer heavy like visual studio
    Edited by: 786363 on Jan 7, 2012 12:30 AM

    786363 wrote:
    i am new to java
    i need to develope java applet
    can i develope java like .net application mean drag button n drop on form and write code on click eventYou can use NetBeans. But my suggestion is, as you are a new bee to java, do not go with the IDE to learn the basics. Search in the google for some beginner tutorials in applet and whatever you want. Lesson: Java Applets is a quick guide for that.

  • Installation Oracle10g Release - 2 RAC (2 Node) on HP-UX 11.23 using OCFS-2

    Hi All,
    I want to install Oracle 10g Release - 2 RAC (2 Node) on HP-UX 11.23 using OCFS-2. Please send me a link or docs which describes about step by step instruction of OCFS-2 and RAC on HP-UX 11.23.
    Thanks,
    Subhankar

    Subhankar,
    Check this link out
    http://download.oracle.com/docs/cd/B19306_01/install.102/b14202/toc.htm
    and make sure you have met all the pre-requisites (patches to install oracle on hp-ux 11- you can refer to oracle domentation for the required patches.
    Aslo, if you have access to metalink you can refer to this Doc ID: Note:182177.1 Step-By-Step Installation of RAC on HP-UX. Actually this was created for 9i but it will give you a general idea.

  • Can SQL Developer be used for Oracle Support "HTML Output" Diag Scripts ?

    Hi All,
    Oracle Support has asked me to run a diagnostic script (OTL_Diag.sql for anyone familar with the script) that produces output in HTML format using SQL*Plus to help troubleshoot an OTL problem we are having. Unfortunately I don't have SQL*Plus installed and my company is not on board with me installing it because of the SQL*NET connection required. Instead I have access to SQL Developer 3.1.0.7. While this works fine for most situations I'm having problems generating the required .html output file that Support needs.
    I've tried runing the OTL_Diag.sql a couple of ways using SQL Developer. First, I opened the file from SQL Developer and using the Run Script functionality (F5) I executed the code that way. This method did give me an opportunity to input the necessary parms and it did create the 'start' of the HTML file on my (Windows) file system, but the script seemed to abort with a java error that indicated some sort of format error (sorry, I'm not a java person so I can't provide any more info, but I'll be glad to get the exact error message if anyone thinks that will help solve my issue).
    My second approach was to open a SQL Window where I typed in @C:\OTL_Diag.sql without quotes. This approach also gave me the opportunity to enter the necessary input parms and it seemed to end normally. It also created the 'start' of the diaganostic output file on my Windows file system, but it 'completed' before any of the 'real' diaganostic output was written to the .html file.
    The Metalink note clearly specifies that the OTL_Diag.sql script is to be run with SQL*Plus 10.2 or above so I don't think I can complain too loudly to Oracle about this...but given that I don't have access to this product (and it is useless for me to again ask to install it) I am hoping someone out there has some ideas or insight as to how I can use SQL Developer to execute this diag script in a manner that will produce the required .html output file.
    Thanks in advance to anyone taking time to read my post !!
    Jeff
    Edited by: user13111861 on Jul 10, 2012 6:43 PM
    Edited by: user13111861 on Jul 10, 2012 7:51 PM

    >
    As a result, at this point in time my only available tool to run the OTL_Diag.sql script (provided by Oracle Support) is SQL Developer
    >
    Then you will have to edit the script, break it into pieces, execute each piece manually and save the output to feed into the next piece as required based on what the script is actually doing. Don't post the script or contents as that will likely violate your support agreement.
    As I already mentioned the script may be using syntax and/or commands that are simply not supported by sql*developer. One likely area is the script may be producing intermediate output scripts that are then processed by a later portion of the script. If that is the case then my suggestion to execute the pieces manually should work but you will need to do some trial-and-error to see.
    Even if you appear to be successful you will still have an issue when you communicate the results of your 'test' to Oracle support and they determine you didn't follow their instructions to use the proper tool.
    Sounds like your management is either ignorant or incompetent so I suggest you cover yourself by documentating the instructions from Oracle support and the direct orders you were given to disregard those instructions. No need to discuss that issue further but clearly there are resources available somewhere in the org that has the proper privileges or they wouldn't be able to maintain and support the database. If they want to pay for support they should heed their advice. Nuff said.

  • Problem in loading an applet using JRE 1.5

    Hi,
    I have an applet which is working fine under JRE 1.4, but the same applet failing to load by using JRE 1.5
    Problem Description:
    1. The images in the applet fails to load using JRE 1.5
    2. The Username and Password text box are also failing to initialize.
    Can anyone help me out in this.
    Is there any code changes required ?

    I wonder if you have the same problem as me... Maybe we can find a solution for us both, no need for me to open a new thread for this topic then...
    I wrote an applet using Swing and compiled it using JavaSDK 1.4.x. I also installed the 1.4.x JRE for both of my test browsers. In Mozilla 1.1 the applet displays properly all the time. In IE6 SP1 it sometimes works as intended but sometimes the applet simply stops working, as per my Java Console somewhere after invoking the "start" method. Parts of the applet simply become gray and when I resize it - I have a JFrame in my applet - the whole JFrame becomes gray and does not respond to input nor it redraws itself. Shutting down IE does not close the JFrame(although the java console reports normal program termination and cleanup) and the only way to close it is through the task manager. I am using Windows 98SE btw.
    Does it sound similiar to your problem? It happens ONLY with IE, not with Mozilla. Anybody has an idea on what it could be? I doubt there's an error in my code...

  • Html file to run an Applet using swings in 1.4.1 or 1.3.1

    Can anyone send me an html document to launch the applet in a browser. I have very basic html, but I need one that uses the appropriate plug-in and that has parameters such as height, width, etc. My applet uses tabbed panes, dialog boxes and comboboxes. It works well with appletviewer, but does not work in IE or Netscape.
    Thank you for your help
    here is what I am using which does does show anything but a grey screen
    <HTML>
    <HEAD>
    <TITLE>
    CIS 602 Semister Project
    </TITLE>
    </HEAD>
    <BODY>
    <BR>
    <H3>
    <CENTER>
    Swing
    </CENTER>
    </H3>
    <H3>
    <BR><BR>
    <P><H3>
    <CENTER>
    <BR><BR>
    <P><h2>
    Structured Problem Solving Strategy
    </h2>
    <blockquote>
    <!--"CONVERTED_APPLET"-->
    <!-- CONVERTER VERSION 1.1 -->
    <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" WIDTH = "570" HEIGHT = "500" codebase="http://java.sun.com/products/plugin/1.1.2/jinstall-112-win32.cab#Version=1,1,2,0"><NOEMBED><XMP>');
    else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.4.2" java_CODE = "semiclient.class" WIDTH = "570" HEIGHT = "500" pluginspage="http://java.sun.com/products/plugin/1.1.2/plugin-install.html"><NOEMBED><XMP>');
    //--></SCRIPT>
    <APPLET CODE = "semiclient.class" WIDTH = "570" HEIGHT = "500" ></XMP>
    <PARAM NAME = CODE VALUE = "semiclient.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4.2">
    </APPLET>
    </NOEMBED></EMBED></OBJECT>
    <!--
    <APPLET CODE = "semiclient.class" WIDTH = "570" HEIGHT = "500" >
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
    </Center>
    <BLOCKQUOTE><PRE>
    </PRE></BLOCKQUOTE>
    </H3>
    <BLOCKQUOTE><PRE>
    </PRE></BLOCKQUOTE>
    </H3>
    </BODY></HTML>

    Try this:
    <HTML>
    <HEAD>
    <TITLE>CIS 602 Semister Project</TITLE>
    </HEAD>
    <BODY>
    <CENTER><H3>Swing</H3></CENTER><CENTER><H2>Structured Problem Solving Strategy</H2></CENTER>
            <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                width="750"
                height="575"
                align="baseline"
                codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4_0-win.cab">
                <PARAM NAME="code"       VALUE="full.qualified.ClassName">
                <PARAM NAME="codebase"   VALUE="path/to/your/class/files/or/archive/">
                <PARAM NAME="archive"    VALUE="nameOfJarWhichContainsClassFiles.jar">
                <PARAM NAME="type"       VALUE="application/x-java-applet;version=1.4">
                <PARAM NAME="scriptable" VALUE="false">
                <COMMENT>
                    <EMBED type="application/x-java-applet;version=1.4"
                        width="750"
                        height="575"
                        align="baseline"
                        code="full.qualified.ClassName"
                        codebase="path/to/your/class/files/or/archive/"
                        archive="nameOfJarWhichContainsClassFiles.jar"
                        pluginspage="http://java.sun.com/products/plugin/1.4/plugin-install.html">
                        <NOEMBED>
                            No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
                        </noembed>
                    </embed>
                </COMMENT>
            </OBJECT>
    </BODY>
    </HTML>

  • Problem with a example of "Developing and Using ADF Faces Skins"

    Hi, I've tried the example "Developing and Using ADF Faces Skins", but when I run the sample.jspx page and choose the skin "MyCompany" in the select skin I obtain the next message:
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer._getIconData(SideBarRenderer.java:393)
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer.prerender(SideBarRenderer.java:83)
    at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:79)
    Could somebody help me?
    Thanks a lot ;-)

    Hi there,
    I had the same issue last friday.
    It's probably because you are using JDeveloper 10.1.3.2 instead of 10.1.3.0 or 10.1.3.1 for which the example is made.
    I haven't been able to fix this yet, other then by commenting out the this part of the css.
    Luc Bors
    Message was edited by:
    lucbors

  • Developing and using Adobe AIR native extensions for Android devices

    I was using this tutorial:
    "Developing and using Adobe AIR native extensions for Android devices"
    http://www.adobe.com/devnet/air/articles/ane-android-devices.html
    When packing the Flex mobile ANESampleTest to deploy on an Android device, the below error happens
    Error occurred while packaging the application:
    aapt tool failed:invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/drawable-xxhdpi
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw600dp
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw720dp-lan
    Does anyone know what the issue might be?

    Did you find a workaround for the Error? I'm getting the same and I can't seem to find any solution.

  • Japanese text display problems in applet using plugin

    Hi,
    We've been beating our heads against the wall on this one for quite some time, so any help would be greatly appreciated.
    Our product uses a third party applet (Kavachart from Visual Engineering) to display graphical statistics from our database. We are currently localizing our product to support english and japanese. With Japanese enabled, all pages use euc-jp encoding. The problem we are running into is in the display of japanese text inside this applet in IE 5 and NS 4.7x when using the java plugin (1.3 or 1.4). If the default jre of the browsers are used, the text in the applet renders fine.
    On a suggestion from the supprot folks at Visual Engineering, I modified our code to set the defaultFont parameter on the applet to "serif, 14, 1". With this set, the text in the applet renders ok in IE, but NS on windows and unix is still broken. Given that we are doing all these tests on machines running a native japanese OS, it's not even clear to me why setting the defaultFont should even be required, but at this point, I'll take anything :-)
    Has anyone else run into this and either solved it or proven that a solution is not feasible? I'm at my wits end here....
    Thanks in advance,
    Mark Evangelisto
    Synchronicity Inc.

    If you are using different java plugin, you need to install the international version of the JRE; otherwise, some characters may not be able to display correctly since some of the properties files are missing.
    As for Visual Engineering's suggestion. I don't know why they tell you to set the default font on the applet because it may cause the browser to use the font specified. Your applet works on IE because it will try to use the best font to match the web page's content. For NS anything less then 6.0 (technology based on Mozilla), they never display web page correctly especially if you did what VE suggest.
    If you are running the applet on the native langauge OS with the international version of the JRE installed, the applet should display correctly without setting the default font. If it is not the native langauge OS, first you need to install the international version of the JRE and have the fonts that are able to display the language the applet use.

  • Writing new HTML to a page from an applet using LiveConnect, 1.3.1 Plug-i

    Has anyone been able to successfully replace a page with an applet with the dynamically generated HTML from an applet using LiveConnect and Plugin 1.3.1 in Netscape 6.2 or IE?
    The following works fine without plugin or with 1.4.0 beta3 plugin.
    Here is the code that I use without plugin:
    JSObject windowObject = JSObject.getWindow(this);
    JSObject documentObject = (JSObject) windowObject.getMember("document");
    documentObject.call("close",null);
    documentObject.call("open",null);
    String anArray1[] = {null};
    anArray1[0] ="some HTML here";
    documentObject.call("write", anArray1);
    documentObject.call("close",null);
    Here is the code that I use with 1.4.0 plugin:
    JSObject windowObject = JSObject.getWindow(this);
    JSObject documentObject = (JSObject) windowObject.getMember("document");
    String anArray1[] = {null};
    anArray1[0] ="some HTML here";
    documentObject.call("write", anArray1);
    When I try to use anyone of the above using plugin 1.3.1, the browser either hangs or plugin generates runtime error. What is the correct way of writing to a document object? Or what is the way that works for 1.3.1 plugin?

    Hi,
    I am doing this in my applet to replace the page containing the applet with the new content. I tested that extensively with Netscape 4.7 and IE 5.5+. Definitely works if you are using Java Plug-In 1.3.1_02. Does not work well in Netscape 6.2.
        protected void setPageContent(final String newContent) {
            final JSObject window = JSObject.getWindow(this);
            final JSObject document = (JSObject) window.getMember("document");
            new Thread( new Runnable() {
                            public void run() {
                                document.call("clear", null);
                                document.call("write", new String[]{newContent});
                                try {
                                              document.call("close", null);
                                   } catch (JSException ignored) {
                        } ).start();

Maybe you are looking for