JAVA FX 1.3 Usage Notes – By W.ZH

By W.ZH — From July 2010 to ….0. Although I can start use FX from June 2010, and Oracle has done the merge with Sun, but jdeveloper still can not used to develop the FX, Not sure are they going to support this or not. So current we can only use eclipse or netbean to develop the FX UI latest is 1.3.1.

1. How to deploy the FX into a jsp page?

You can deploy that as an applet and insert applet into the jspx. You need insert the js(fx’s js ) in jspx page to start the main call in your applet. And netbean can create js and alos the jnlp( you know, java web start tech) file for you , Inside the jnlp, you can see how the applet is config and set.

Link to here to see how a jnlp is composed:

http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/guide/javaws/developersguide/syntax.html

http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/guide/jws/developersguide/syntax.html

http://lopica.sourceforge.net/ref.html

2. Can I run a jnlp directly from URL?

Sometimes you can, it will trigger the IE/FF to start the web start and show your app. But sometimes can not…

Such as for jx applet, seems need to trigger from a html/jsp page with js of fx to start it. If I try from jnlp directly it will give you many exceptions that not meet in the un-straight way.

3.
MissingFieldException [ The following required field is missing from the launch file: <jnlp>] ???

This a very common error for jnlp, refer the 2 for the solve,   if you really have this error, even after try the point 2, ti might be your jnlp utf-8 issue.  http://www.coderanch.com/t/200623/JNLP-Web-Start/java/missing-launch-file-jnlp

Normally other exception will clearly say what problem is, will be easier to solve, only this exception is hard to deal with. This in fact used to be a jnlp bug , might still be.

4. ADF and jspx fx page.

Such as for my experience, if my jspx is a html format, not a ADF format,,, this means that my jspx not use any ADF.. the i can access my page use the

http://myhost:myport/root/faces/page.jspx

or

http://myhost:myport/root/page.jspx

but in link of
http://myhost:myport/root/faces/page.jspx, applet for fx will failed with that
issingFieldException exception, link 2 works in fact. I think adf faces filter has some impact to the FX applet. This part should be solved in future in ADF. Or i need to check my web app config or sec config, there might a way to solve this.

5. 2.0 road map impact Sept 2010-

After I haved developed a small prject with javaFX , Oracle in the OW announced that 2.0 version javaFX will be ready in 2011 H2. But 2.0 will not use any javaFX script, They will supply java API for FX. This in fact is very big change in the JavaFX world. It means all the existing code in javaFX need rewrite !

Advertisements