Forum Stats

  • 3,826,058 Users
  • 2,260,592 Discussions
  • 7,896,782 Comments

Discussions

Use WebEngine to view applet demo of JDK problem

866755
866755 Member Posts: 2
edited Jun 6, 2011 10:15PM in JavaFX 2.0 and Later
When I used webEngine to view applet demo of JDK like this:

WebEngine webEngine = new WebEngine("file:///C:/Program Files/Java/jdk1.6.0_25/demo/applets/BarChart");

I got message on the page inside JavaFX like this:

alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!

So, my question is how can I embed applet in webEngine or can webEngine embed applet?

Thank you very much!
Tagged:

Answers

  • shakir.gusaroff
    shakir.gusaroff Member Posts: 689 Gold Badge
    Try this:
    WebEngine webEngine = new WebEngine("file:////C://Program Files//Java//jdk1.6.0_25//demo//applets//BarChart");
  • 866755
    866755 Member Posts: 2
    I forgot to mention that I launched program and click link of "example1.html",

    so the true URL I used is " WebEngine webEngine = new WebEngine("file:////C:/Program Files/Java/jdk1.6.0_25/demo/applets/BarChart/example1.html"); "


    I tried " WebEngine webEngine = new WebEngine("file:////C://Program Files//Java//jdk1.6.0_25//demo//applets//BarChart//example1.html"); ",

    I still got message on the page inside JavaFX like this:

    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!
  • shakir.gusaroff
    shakir.gusaroff Member Posts: 689 Gold Badge
    There are a few known bugs related to webengine:
    • Issue RT-12439: WebView can not be gc-ed (garbage-collected).
    Description: Memory leak causes the application to crash with an out-of-memory error on web sites that have a lot of content, running scripts, and automatic updates.
    Workaround: To be able to reclaim the WebEngine object, call the webView.setEngine(null) method.
    • Issue RT-12440: WebView is updated even when it is invisible.
    Description: Performance is impacted.
    Workaround: Include a call to the webView.setEngine(null) method in your application.
    For more info take a look at http://download.oracle.com/javafx/2.0/release_notes/jfxpub-release_notes.htm
This discussion has been closed.