My previous post walked you through compiling and running a simple compiled JavaFX Script program. It required building the OpenJFX Compiler. Today, I'm going to explain how to save some steps by downloading the latest build of the OpenJFX Compiler rather than building it on your machine. If you decided not to build the compiler because it looked like a hassle, then relax -- this is a lot easier. Just follow the instructions on the PlanetJFX page entitled How to Download the Latest Compiler Build Instead of Building It.
Note: The OpenJFX Compiler Project team plans on having a separate weekly build process soon, which will have versioned binary bundles. This will make obtaining the compiler even faster and easier (and take up less space on your system).
Compiling and Executing Your Program is a Little Easier Now Too
To compile the CompiledHelloJavaFX program from yesterday's blog post, navigate to its directory and use the following command:
javafxc CompiledHelloJavaFX.fx
To run the CompiledHelloJavaFX program, use this command:
javafx CompiledHelloJavaFX
Go and Do Likewise
Now that it's easier to obtain the OpenJFX Compiler, go ahead and play with compiling and running your own compiled JavaFX Script programs! That way you'll be ready to give the JavaFX Puzzler a try. As a reminder, it will be posted at 18:00 GMT (1:00 pm EST) on Wednesday, November 28, 2007. Please post a comment if you have any questions.
Regards,
Jim Weaver
JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications
Immediate eBook (PDF) download available at the book's Apress site





If u want to building traditional besopoke orangeries, please visit my site
http://www.kent-conservatory.co.uk/orangeries.htm
The Kent Conservatory Company have been building traditional besopoke orangeries for over 30 years. All our oraneries combine traditional craftmanship together with modern building technologies.
Posted by: Aloke Saha | June 02, 2009 at 05:48 AM
"Nice post, but the SDK is still missing the #1 thing on my list: Media."
samsung,
Can you clarify? Although it isn't complete or perfect yet, media is supported in JavaFX.
Thanks,
Jim Weaver
Posted by: Jim Weaver | March 04, 2009 at 08:11 AM
Nice post, but the SDK is still missing the #1 thing on my list: Media.
Posted by: samsung | March 03, 2009 at 09:49 AM
That is great news, Jim.
Posted by: Coffeejolts | June 16, 2008 at 03:08 PM
I'm told that the media classes will be available as soon as the licensing issues are addressed.
Posted by: Jim Weaver | June 13, 2008 at 02:31 PM
Nice post, but the SDK is still missing the #1 thing on my list: Media. I tried some code from JavaONE and received: java.lang.NoClassDefFoundError: com/sun/media/jmc/Media :( You had me excited for a second!
Posted by: Coffeejolts | June 13, 2008 at 02:11 PM
Hello,
I am new to javafx and i created a simple javafx application in netbeans. I want to know where the class files for *.fx files are created when the project is build.And how to run the .fx file through commandline using javafxc
thanks
Posted by: maishat sana | March 12, 2008 at 07:30 AM
Terra,
Thanks for your kind words. You'll need to set the PATH variable in such a way that the desired bin directory is referenced. I use two different command scripts based upon which I want to run the interpreted or compiled javafx script. Thanks, Jim
Posted by: Jim Weaver | November 26, 2007 at 08:25 AM
This is a additional explanation to my question about the usage of the 'javafx' command.
-----
Should I change the order of specification (or description) of command file's directories in the PATH environment variable? Or, should I specify the fully qualified file name like "C:\openjfx-compiler\dist\bin\javafx" or "C:\openjfx-interpreter\trunk\bin\javafx"?
Posted by: Terra (Hisao Terasawa) | November 26, 2007 at 05:52 AM
I'm always looking forward to your blog update.
I'd like to know how to use both interpreter version and compiler version 'javafx' commands without changing PATH setting. Is it possible?
Posted by: Terra (Hisao Terasawa) | November 26, 2007 at 03:50 AM