... ...
Contact Us
... ...

Workaround for Delay when using LiveConnect

JavaScript can call Java using a technology called LiveConnect. We have noticed that there can be a 3 to 4 second delay the first time that JavaScript calls Java after the browser is launched. It only happens on the first call.

To Do

  1. Bookmark this page so you can come back.
  2. Exit the browser. Bye! (If you don't do this then you probably won't see the delay.)
  3. Relaunch the Browser and return to this page. Hello again!
  4. Click here -> Call Java Applet
  5. Look for a printed message in the Java Applet below. It will take a while to show up.
  6. Note that the elapsed time is several thousand milliseconds.
  7. Click that link above again and notice that the delay is very short.
  8. Visit the next page, which offers a workaround for this problem.

ERROR: you do not have Java installed for your browser. Please install the Sun Java plugin.

The function that calls the Java Applet is:

// Send the current time in milliseconds to the Java Applet.
// The Applet then checks the time it receives the call and prints the difference.
function sendTimeToApplet( message )
    myDate = new Date();
    document.TestLiveConnectApplet.showElapsedTime( message, myDate.getTime() );

       © 2001-2011 Mobileer, Inc.       JavaSonics ListenUp is no longer for sale. (EC2)