Deploying a JavaFX web application

Deploying a JavaFX web application (applet) is trivial. Just use the following code in your HTML page:

<script src="http://dl.javafx.com/dtfx.js"></script> <script>     javafx(         {               archive: "Foo.jar",               draggable: true,               width: 200,               height: 200,               code: "foo.Main",               name: "Foo"         }     ); </script>

The snippet assumes that you build and application called "Foo" (package name "foo";). One may only want to use the "draggable" attribute if the application is intended to run on Java 6 update 10 (or later) which gives the opportunity for users to install a web application on the desktop.

Comments:

Hey this was the thing I was really looking for.... Thanks a lot!!!

Posted by Shiv Kumar Ganesh on January 15, 2009 at 02:50 AM PST #

Very good short post.

Thanks.

Posted by Roger Padilla on January 15, 2009 at 03:40 AM PST #

Nice! I haven't seen a good Javascript solution yet. Thanks!

Posted by Eric Wendelin on January 16, 2009 at 12:47 AM PST #

hi

how can I pass say List of objects from my jsp file to javafx file / applet. I am using Spring MVC and from one of the view I wanted to get javafx stuff in place.

Posted by Vikky on February 18, 2009 at 12:49 PM PST #

I did the above example. I then put it on my web site but the java applet will not load on either Explorer or Firefox although it does load on SeaMonkey. The URL is "cecilemonet.danadrian.com" . Please check it out and see if you can figure out what's wrong.

Posted by Jerry Lowery on February 19, 2009 at 03:06 AM PST #

I error you getting is

FileNotFoundException: JNLP not available: Original_Art_by_Cecile_Monet_browser.jnlp
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.io.FileNotFoundException: JNLP not available: Original_Art_by_Cecile_Monet_browser.jnlp

I think the problem is with the location of your jnlp file. If you reshuffle your jnlp in your application it should work.

Could you please let me know how did you integrated your Spring MVC view (jsp) with JavaFX and are you passing values from jsp to javafx.

Thanks

Posted by Vikky on February 19, 2009 at 11:58 AM PST #

The program was built using the Netbeans 6.5 IDE. I did nothing to the class files after they were automatically compiled by the IDE. I then built the index html file using the SeaMonkey composer and the above code. All of the resulting 5 files were then uploaded to my web site "danadrian.com". What I don't understand is why it will run only on the SeaMonkey browser.

Posted by Jerry Lowery on February 19, 2009 at 03:28 PM PST #

Sorry about the bother. I found out that I was suppose to have Web Start Excution checked in the Netbeans project run properties. It works good now. Check out "cecilemonet.danadrian.com" and tell me what you think I need to do to improve it. It is in the process of being built.
"jerry37@mchsi.com" It's my wife's art site.

Posted by Jerry Lowery on February 19, 2009 at 04:37 PM PST #

Post a Comment:
Comments are closed for this entry.
About

octav

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today