SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Simple JavaScript <-> Java call taking too long to execute in FireFox/NS 7.2

    Hi folks,

    Hope I'm posting this in the right forum as this is both a JavaScript and Java problem

    Anyway, I've just tried a simple JavaScript/Java call with the Applet returning a string like the function below:

    Code:
      public String get_greeting() {
        return "This is LiveConnect!";
      }
    All the normal Applet lifecycle functions are present in the Applet code. The HTML code to embed the Applet is as follows:

    Code:
    <applet name="LiveCall" code="LiveCall.class" codebase="." height="100" width="100"></applet>
    Here's the JavaScript code to call the function in the Applet:

    Code:
    alert(document.LiveCall.get_greeting());
    As you can see, it's a *very* simple function call. When I load the page and click on link to call the JavaScript function in FireFox 0.10.1, I see the following output in the Java console:

    Code:
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    JavaScript: calling Java system code
    JavaScript: default security policy = file://
    The bottom 2 lines are repeated a couple hundred of times spiking the CPU usage to 100%. It goes doing this for about 30 seconds before the request is passed back to the browser. The same is observed in Netscape 7.2 as well.

    Anyone knows if I've missed out anything in terms of Java plugin settings or the <applet> tag? I'm thinking it's got something to do with the Java policy, but I can't seem to find anything on it.

    BTW, I'm using JDK1.4.2_04 on Win2k.

    Any feedback is greatly appreciated.


    Thank you.

  2. #2
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Vermont
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Me too, except I'm not using applet

    Hello,

    I am also having the same problem with Netscape 7.2 and Mozilla 1.4.1+. Mozilla 1.4 is fine. I have found that these browsers do not take up 100% of your CPU if you have a Java Virtual Machine application open in the background.

    Why would my website work in Netscape 7.1 and earlier, but not 7.2? I am not using JAVA applets. This seems like a serious problem. Internet Explorer has always been ok.

    Any ideas anyone?

    Dan


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •