Deploying Applet using deployJava.js...

Hello,
I have followed the directions posted at https://jdk6.dev.java.net/deployment_advice.html which explains how to use deployJava.js to guarantee that a minimum version of the JRE is available on a client desktop. The documentation says that if the client doesn't have the JRE installed, they will be prompted to install it and then redirected back to the site from which they originally came. This last part doesn't seem to work. Once the JRE is installed the client, instead of being redirected back to my site, is redirected to another Sun URL that has a Verify Installation button and the process ends there. The user is never redirected back to my web site. Is there something special I need to do in order to redirect the client back to my web site? Or is this a bug in the deployJava.js? The URL that uses this script is http://www.easypetidtags.com/.

This is a bug on the java.com website. The returnpage argument is being sent to the sight but is being ignored.
They have been informed of this and replied that they are in the middle of redesigning the site, and will incorporate the fix with the redesigned site.
/Andy

Similar Messages

  • Deploying applets with deployjava.js question

    Hi, I'm using deployjava.js and by and large it appears to be working well.
    The one thing that's bugging a few customers is that the very first time that we install Java on IE on Windows; after you accept the Activex control in the IE security bar you're redirected away from our site to Java.com and a big download button.
    The applet page that we were on is completely gone.
    Most people have figured this out but a few others have been confused.
    Is there any way to stay on the applet page and avoid the redirect to java.com?
    Thanks,
    Martin

    Hi gimbal2,
    By uninstalling Java from the Control Panel and then manually cleaning up the registry and filesystem I managed to get deployJava.js to install on IE8 now. Thank you.
    I now have the same problem on all 3 browsers (Firefox, Chrome, IE8) in that the installer takes 2-3 minutes to run, all the time our webpage is being refreshed by deployJava.js every second which looks terrible.
    Finally, when the Java installer completes, it fails to perform the final refresh so on FF/Chrome I'm left with a grey box "A plugin is needed" or on IE8 a white box with the red X icon.
    We have over 3 million users on our website and use applets for streaming stock price data. Yesterday when the default applet security setting in 7u11 was upped to high our users started getting the warning dialog about an unsigned class we use for Java detection and bootstrapping (fair enough).
    The deployJava.js solution now works but looks terrible and leaves the user uncertain as to whether Java installed successfully.
    I'll try and modify deployJava.js to reduce the refreshes and make the final refresh work and post findings here if successful.

  • Pb deploying applet using sqlj

    Hi,
    I'm trying to deploy an applet I have just created. This applet connects to an Oracle 8.1.7 database using this kind of command:
    Oracle.connect("jdbc:oracle:thin:@ ... );
    Then the applet uses SQLJ class to deal with the datas.
    And after deploying my applet (I have checked all the dependancies to make sure I have everything), when I try to open the html file, I get the following error in the java console:
    java.lang.NoClassDefFoundError: sqlj/runtime/ref/ConnectionContextImpl
         at mypackage5.AppInvest.<init>(AppInvest.java:44)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(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)
    Line 44 corresponds to the construction of the sqlj class instanciation.
    I would appreciate any help on this,
    Thanks
    Eric

    OK, you were right ! In fact, I was missing all the jar files in my ARCHIVE tag, but I though that jdevelopper was taking care of all that when deploying the applet. So I don't really see what the advantage of using deploy ...
    However, now, I have another pb. I can launch the applet on my local machine with a www browser. But when trying to connect from other machines, after the loading of jar files, the html page fails on loading my applet itself which is located in mypackage5/AppInvest.class.
    The applet tag is the following:
    <APPLET CODE="mypackage5.AppInvest" ARCHIVE="jdev-rt.jar, runtime12.jar, classes12.jar, nls_charset12.jar" HEIGHT="1000" WIDTH="1000" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    I know this is more a html - java pb, but if you have any idea ...
    Thks,
    Eric

  • Deploying Applet which uses JCORBA

    Hi,
    I've a problem with deploying Applet, which uses JCORBA
    application jcoSql (it's on OAS 4 on Windows NT). I need in
    deploy directory package COM/visigenic/vbroker.. (because of
    calling ObjectFactory) and com/swing/... (because of using
    component JDialog in the Applet). But first direcory COM must be
    in uppercase and second com in lowercase!! And that is problem
    on NT. Could somebody help me?
    Thanks,
    Ales
    null

    You can make one (or both) of te packages available in a ZIP or
    JAR file.
    Thanks,
    -Roel.
    Ales Kemr (guest) wrote:
    : Hi,
    : I've a problem with deploying Applet, which uses JCORBA
    : application jcoSql (it's on OAS 4 on Windows NT). I need in
    : deploy directory package COM/visigenic/vbroker.. (because of
    : calling ObjectFactory) and com/swing/... (because of using
    : component JDialog in the Applet). But first direcory COM must
    be
    : in uppercase and second com in lowercase!! And that is problem
    : on NT. Could somebody help me?
    : Thanks,
    : Ales
    null

  • Deploy Applet and MySQL - how to read and write

    Question on deploying Applet and MySQL
    I am building an applet that is to be a part of a simple game. The applet is supposed to read data from a MySQL server and use it to place towns on the map. In addition, the applet must be able to write to the base.
    I have build a prototype and ran it in netbeans on my computer. It then successfully read data from a local MySQL base. HOWEVER; when I embed the applet in html code it no longer reads from the base. My method for connecting to the base is
    try{
    Statement stmt;
    ResultSet rs;
    Class.forName("com.mysql.jdbc.Driver");
    String url=adress;
    Connection con=DriverManager.getConnection(url, user, user);
    stmt=con.createStatement();
    rs=stmt.executeQuery("SELECT * " +
    "from "+table+" ORDER BY id");
    while(rs.next()){
    get data...
    Town T=new Town(data...); //construct town object
    TL.put(T); //put town objects in an object TownList to use later
    con.close();
    catch(Exception e){
    So;
    1) Why wont the applet read anymore?
    2) Is there a better way to do this? I have heard that its better to connect applets to servlets in some situations. What demands does this place on the server? Is there software that you need to install on the server to use servlets?

    I think I do need an applet. The map I have written permits a lot of features that I dont know how to achieve in another way.
    1) Zooming in and out on mousewheel
    2) Clicking on on two towns gives the distance and by selecting a trooptype one can get information about the traveltime between cities.
    3) Right now, I have a feature to find players or groups of players that are of special interest. It allows a player to submit a list of interesting players. The applet reads this list and provides a button with the players name. If one clicks the name of a player, all his cities flash between their originall color and white (using thread).
    I need java to do this and I need to run it in a webbrowser because there are som parts of the game that is made up of php. So I assume I have to build it as an applet?

  • Deploying applet to OAS 4.0.8.1

    I have made simple applet using the Wizard in JDeveloper 3.0. I have used the Deployment wizard to make a Jar file. I also included
    the swingall.jar. The Jar file is generated successfully. I then copy
    the jar file and the html file to the OAS 4.0.8.1. But when I try to run
    it I get the following error:
    java.lang.NoClassDefFoundError: javax/swing/JApplet
    Anyone?

    Sounds like you might still be having swing problems. Insure that you are using the java plugin from Sun and that the swingall.jar is included in the ARCIHVE tag before running the HTML converter (from Sun) on the HTML file. Then stage the converted HTML file on the webserver and have all of the deployment archives included in the CODEBASE directory.

  • 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

  • Deploying Applets on OAS (urgent help needed)

    I have installed and Configured OAS 4.0.7.1 on Win Nt Server ( SP5)
    I have created a very simple Java Applet using JDeveloper 1.1 and followed the deployment method as specified in the Work book (Student Work book).
    I have modified the source to add the ARCHIVE line.Using the Deployment Wizard I have created the archive file (.jar).
    I have the Java class files and the archive file in the same directory.
    I have added a HTTP Listener with port 90 and set the Directory for Virtual path corresponding to the directory where the java class files and archive files are available.
    Now when I enter the URL for the invoking HTML file from the Browser the Applet seems to be loading but it doesn't. The error message at the bottom of the Applet(looks like the Applet Window):
    load: <packagename>.<classname> cannot be instaniated.
    Please help me to resolve the problem at the earliest.
    Thanks
    Thiru

    Marcosk2,
    I am still having problems.
    kindly tell me the steps in detail.
    what i have done is:
    1.i have a simple applet (with frame) with a button.
    2. I have edited the html file and included the following:
    CODEBASE="imtac" -the virtual directory name
    ARCHIVE = "carclas.zip"
    3.with Deployment Wizard I have created the zip file (carclass.zip);
    Whe I run the Applet (in JD1.1) it is not running as it is looking for the path (imtac) but if i remove the virtual path (imtac) then the applet runs. You asked me to include the virtual path name in the CODEBASE parameter.
    Please do let me know in steps so that i too can deploy the applets in the WEB.
    It will be of great help even if u give me your telephone no with country code and area code so that I could talk to u and make things workable here. ( i am in Oman).
    I have to give a demo tomorrow.
    Thanks

  • Deploy.java - weird deployJava.getJREs behavior

    Can I use deployJava.js on a machine that does not have 1.6.0_10 installed on it? I am asking because of this scenario:
    I have a couple of machines with numerous JREs (1.4.X, 1.5.X, 1.6.X) installed, but it has never had 1.6.0_10 installed on it.
    I did the following (notice the radically different return values of deployJava.getJREs().toString())
    1. deployJava.getJREs().toString() returns "1.6.0". I had expected a list of all JREs.
    2. Install 1.6.0_10.
    3. deployJava.getJREs().toString() returns the complete list of installed JREs.
    4. Remove 1.6.0_10
    5. deployJava.getJREs().toString() continues to return the complete list of JREs. I had expected it to revert to step #1 behavior.
    I am trying to make sense of this. If 1.6.0_10 is required to use these java script functions, why did the getJREs function continue to work even after I installed 1.6.0_10? Does 1.6.0_10 leave something behind in the browser that allows these functions to continue working?
    Does anyone else have experience with this?

    Hi
    I believe something does stay behind. The Deployment Toolkit plugins for your browsers don't get removed even after you uninstall 6u10. Check your firefox addons and IE addons.
    A side note: since the DT doesn't appear to need a JRE (it works pretty well even after uninstallation), why is it only distributed with the JRE? It would make a lot of sense to download only the plugin, thereby getting the functionality of 6u10 without yet having 6u10. It's not that I don't want 6u10, it just want it now! Because you can't use deployJava.installLatestJRE without the DT. At least, it works but not in a cool way. You can't use deployJava.setInstallType("kernel"), because it will only work if 6u10 is already installed. Am I just really confused? What is the purpose of these new generation plugins if you need them in order to install them?
    It doesn't help me a bit to have a customer with 1.5.0 installed to click a webstart launch button (created with deployJava.createWebstartLaunchButton). It will simply redirect him to a java install page (and use the online installer, despite having specified kernel). Then it doensn't direct him back to my jnlp, despite the code from the createWebstartLaunchButton method clearly shows that this is to be expected.
    I'm really impressed with the new functionality. It's been needed for a LONG time. But isn't it a bit chicken-egg? Better documentation would help.
    Thanks

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

  • What is the Design to Deployment Workflow using DW with WordPress?

    I am a Designer and Developer/programmer. This is a complete workflow question: What is the Design to Deployment Workflow using DW with WordPress? For example, is it:
    PS/IL > DW > WP? (Photoshop or Illustrator, Dreamweaver, WordPress?)
    Or is Edge Reflow inserted between PS and DW?
    PS > ER > DW > WP?
    Are these workflows iterative and, whats the word, recursive - we are able to go back and forth?
    My understanding is that the Edge tools are not up to the coding standards of DW, and ER > DW (Edge Reflow to Dreamweaver) is not seamless or even practical.
    Where does the Stack come in? MAMP (or LAMP/WAMP) of course, jQuery/jQuery UI, WordPress and other items; how integrated are these things?
    I used to be a Flex developer and quite comfortable with the Design to Dynamic Deployment workflow of Illustrator or Photoshop to Flash Catalyst to Flash Builder; moreover, I thought the Eclipse IDE was excellent with its database introspection capabiliities, debugging etc. Adobe really pushed this workflow, then instead of innovating and standing behind its own product with 98% market penetration, Adobe disembowelled Flash right before everyones eyes.
    What about Prototyping, which is certainly part of the process? Fireworks is on the kibosh. Illustrator, while excelling at some aspects falls short of making a functional prototype (unless you're tying in Acrobat to link the pages), and while Photoshop is Edge Reflows darling, Edge seems redundant with DW and spits out twacky code.
    (Muse of course is unusable for professional developers, but it makes you wonder why some of those UI elements where not employed in DW whose interface seems antiquated by comparison).
    It seems Adobe is bloody all over the place, more like a rabbing drunk with a microphone rather than the dependable go-to software company for creatives the world over.
    In my opinion, workflow from beginning to end is important. Having a million different options to try to accomodate everyone is not. Some guidance in this department is greatly appreciated!
    Best,
    Dylan

    I have not used Edge Reflow myself.  Nor do I espically like WordPress.  But my typical workflow is:
    PS for Design Concept and web images.
    DW for CSS, HTML & JavaScript.
    3rd party editors like Zend Studio & Navicat for PHP & MySql development.
    Nancy O.

  • 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();

  • Please give me an exemple of an applet using a swing object.

    Please give me an exemple of an applet using a swing object.thank you.

    My problen is that the swing object do not appear in
    my applet. They appear only if i invoque the repaint
    methode.use JApplet, since awt components are heavyweight, and swing components are lightwieght, then your swing components get over painted with aplets background or something.
    anyhow, in your applet you may create JFrame, that would be swing component and if you set it visible, then it will be even visible.
    they say that mixing swing and awt is not good idea, especially when you don't know what you're doing (which might be true in your case)
    so try to migrate your app from AWT based stuff to SWING based stuff, or write your own AWT components that do the job whih you needed swing component for at the first place.
    but if you need to mix awt and swing, then i thing that you should not paint the fole area of applet in applets paint method -- but here i'm not sure, never mixed 'em.
    so you might try to create an applet which paint() method you leave empty and to which you add some JComponent*.
    and see what happens, maybe this JComponent will be visible.
    * -- JComponent is most likely just gray, you might want to add some subclass of it -- JButton, JTextField, JSomethingElse.

Maybe you are looking for