March 24, 2008

Compiled JavaFX plugin for Netbeans

Friday the Netbeans JavaFX plugin team released daily public builds of the JavaFX plugin for Compiled JavaFX script.

You'll need the latest Netbeans 6.1 beta daily build to get it up and running.

Then download the daily JavaFX plugin archive (ZIP or TGZ) from their Hudson build server.
  • Install Netbeans as usual.
  • Modify the Netbeans config file under [netbeans-install-dir]/etc/netbeans.conf and include the -J-da option inside the quotes for parameter: netbeans_default_options If you don't the JavaFX compiler won't work because of a bug
  • Unpack the JavaFX plugin archive
  • Start Netbeans, go to Tools > Plugins > Download
  • Click add plugins...
  • Select the .NBM files you unpacked from the plugin archive
Optionally you can choose to use your own versions of the JavaFX Compiler libraries if you build your own version from SVN repository for example.
  • In Netbeans go to Tools > Libraries
  • Select JavaFXUserLib
  • Modify the provided javafxc.jar, javafxrt.jar and Scenario.jar with the ones you prefer
That's it, now you can enjoy (for now): syntax highlighting and compiling JavaFX script from Netbeans. If you want to keep posted on this plugin send an empty mail to their mailing list dev-subscribe@javafx.netbeans.org

March 08, 2008

Exciting JavaFX

It has been a while since I blogged but there's a very good reason for that. Since a few months I'm spending all my free time on a cool project to be showcased soon. I can't disclose too many details as off yet but I can tell it's a Rich Internet Application prototype written in JavaFX. It started out as a technology proof of concept but it's taking on the form of a real application. In the mean time without unveiling too much yet I can give some pointers and lessons learned while discovering the JavaFX language.

Getting started with JavaFX

When starting with JavaFX Script an easy way to start is to try one of the webstart demo's on the Chris Oliver blog. Try out the links with JavaFX Pad, these allow you to modify the FX script code and get immediate feedback from the JavaFX interpreter. This way you get to know play with FX Scripting language, without really having to install anything.


At this point you need to know that the FX interpreter is a prototype so the FX Script syntax will be different in the final product of the JavaFX compiler. As most documentation and examples on the web (excluding the latest examples on Jim Weaver's Blog) use the interpreter syntax and the FX Compiler is incomplete, it's best to get aquainted with the language like this and move on to the FX compiler understand how everything work.


IDE

When developing in FX interpreter syntax you have the luxury of a Netbeans and Eclipse plugin to help you out with code completion, syntax highlighting, some javafxdoc and real-time script execution results. They can be found here https://openjfx.dev.java.net/#downloads
Getting started with Netbeans is explained here https://openjfx.dev.java.net/Getting_Started_With_JavaFX.html

Documentation

When you get around playing with Chris's examples a good place to start looking for more answers on the language constructs is https://openjfx.dev.java.net/JavaFX_Programming_Language.html
and https://openjfx.dev.java.net/Learning_More_About_JavaFX.html.
The JavaFXDoc API for the FX Script classes can be found here https://openjfx.dev.java.net/nonav/api/
There's also a Wiki with a lot of JavaFX related information, examples, components, know issues, requests etc. on http://jfx.wikia.com/wiki/Main_Page

Forums

More and more people monitor and post regularly on the OpenJFX forums, it's a good place to ask for help for the FX interpreter syntax, the forums can be found at http://forums.java.net/jive/category.jspa?categoryID=62

The compiler

If you really want to start working with the bleeding edge FX compiler under development you should subscribe to the OpenJFX Compiler mailinglist (dev@openjfx-compiler.dev.java.net), monitor their JIRA issue tracker and SVN commits (commits@openjfx-compiler.dev.java.net). There isn't any documentation up to date on the compiler syntax yet, but you can look in the source and the numerous examples inside. There is however a dated page on the Wiki on the differences between the interpreter and compiler.
As I'm in the middle of such a conversion I started a shared Google Docs page where I log all my issues and workarounds: this is a work in progress and has as main goal to be merged with the Wiki page once I finish my conversion. Everyone can request write access to this document, this way as a community we can improve the documentation. Feel free to join in on this effort!
Another great source for information is Jim Weaver's blog where he posts new examples on learning the new compiled FX Script syntax on a daily basis.


So now with all this information assembled I hope more and more people will find their way into this exciting new technology. With this first post on the subject I'm hoping to start a series of JavaFX related posts that will help people get to know all about it and why it's potentially the biggest leap for desktop Java.