Forum Stats

  • 3,839,012 Users
  • 2,262,438 Discussions
  • 7,900,836 Comments

Discussions

javafx 2.0: creating applet

711527
711527 Member Posts: 7
edited Aug 3, 2011 8:48AM in JavaFX 2.0 and Later
Hi all,
I am trying to run sample applications come with javafx SDK 2.0 and they work fine. However, when I tried to run those jnlp web-starts or the applet embedded websites they do not work. I think this was because the file cannot find the javafx runtime environment.
<jfx:javafx-runtime version="2.0+" href="http://javafx.com/jfx-20.exe"/>
I read in the release note that with this version oracle has not supported downloadable javafx runtime like version 1.3 but we have to install it manually in each client machine. Then, I install the runtime but the browser is still complaining that I have to install javafx runtime etc... do I need to change anything in above configuration option?
SO my question is what is the right configuration (javafx-runtime version) for the jnlp and how to put it in a website.
Last but not least, Is there anyway to put the javafx runtime somewhere so that it can be downloadable the the applet is loaded, just like what we were doing with javafx 1.3, this is so annoying that users have to install additional plugin when using this applet application.
Thx you guys for any help.
BR,Lam

Answers

  • 711527
    711527 Member Posts: 7
    hi, has anyone successfully run those *.html files (applet embedded) in the sample apps shipped with javafx SDK yet?
  • Narayan
    Narayan Member Posts: 310
    edited Jul 18, 2011 10:11PM
    hello the javafx applet runs very good. You can see sample at here of javafx 2.0 too: Direct Applet Link or Blog link.

    You can easily use the javafx in browser too. If you see that your browser is not taking javafx 2.0 then please remove all java install files and reinstall the java sdk then finally only install javafx.
    And ya you can also use jfxrt.jar for compatible with javafx 2.0 but I think it's not better idea though.

    Thanks.
    Narayan
  • 711527
    711527 Member Posts: 7
    Thank you Narayan,
    I have solved my problem, Im using 64bit system and firefox5 which is not supported!
    About my last question, is there anyway to put the javafx2 runtime online so that user does not need to download the javafx RE in all clients just like with javafx1.3?
  • Narayan
    Narayan Member Posts: 310
    About my last question, is there anyway to put the javafx2 runtime online so that user does not need to download the javafx RE in all clients just like with javafx1.3?
    i think the below code helps to load the jfxrt.jar from your jnlp.
    <resources>
            <jar href="lib/jfxrt.jar" size="11361705"/>
    </resources>
    But the size of your application gets heavy.



    Thanks.
    Narayan
  • 711527
    711527 Member Posts: 7
    Hi Narayan,
    I think the application also needs those dll files in JFX RE/bin folder, adding only the single jfxrt.jar file to the classpath will not work but the jar file should be placed relatively with other dll files. It creates some errors like this:

    java.lang.UnsatisfiedLinkError: C:\Users\1234\workspace\NetXVisualization\bin\mat.dll: Can't find dependent libraries

    BR,lam
  • 817264
    817264 Member Posts: 342
    About my last question, is there anyway to put the javafx2 runtime online so that user does not need to download the javafx RE in all clients just like with javafx1.3?
    No, this will not be possible.
    Primarily because JavaFX requires upgrade to Java Plugin and this can not be done while running Java plugin.

    Once JavaFX 2.0 is released runtime installer will be available and attempt to launch JavaFX app will offer to install JavaFX runtime.
    For users who has JRE7 it may even launch installer automatically (if auto-install requested).
  • 711527
    711527 Member Posts: 7
    Hi igor,
    So why dont they put the javafx run time environment into newest JRE so that client computers have it as default.
    My concern is that I dont want to install anything more in my computer in order to view the content in a website.
This discussion has been closed.