Tải bản đầy đủ (.pdf) (332 trang)

JavaFX 1.2 Application Development Cookbook doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (6.94 MB, 332 trang )

www.it-ebooks.info

JavaFX 1.2 Application
Development Cookbook
Over 80 recipes to create rich Internet applications with
many exciting features
VladimirVivien
BIRMINGHAM - MUMBAI
www.it-ebooks.info
JavaFX 1.2 Application Development Cookbook
Copyright © 2010 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, nor Packt Publishing
and its dealers and distributors will be held liable for any damages caused or alleged
to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2010
Production Reference: 1170810
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847198-94-5
www.packtpub.com
Cover Image by Karl Moore ()


www.it-ebooks.info
Credits
Author
Vladimir Vivien
Reviewers
Anghel Leonard
Luca Masini
Meenakshi Verma
Acquisition Editor
Sarah Cullington
Development Editor
Dhwani Devater
Reshma Sundaresan
Technical Editors
Aaron Rosario
Mohd. Sahil
Indexer
Hemangini Bari
Tejal Daruwale
Editorial Team Leader
Akshara Aware
Project Team Leader
Priya Mukherji
Project Coordinator
Leena Purkait
Proofreader
Clyde Jenkins
Production Coordinator
Melwyn D'sa
Cover Work

Melwyn D'sa
www.it-ebooks.info
About the Author
Vladimir Vivien is a software engineer living in the United States. Past and current
experience include development in Java and .Net for industries including publishing,
nancial, and healthcare. He has worked with a varied number of technologies including
user-facing GUI frontends and backend middleware. Vladimir enjoys taking part in open
source projects. He is the author of JmxBuilder a Groovy DSL for instrumentation and
management that is now part of the core Groovy project. Vladimir has presented some
of his ideas at JavaOne, NFJS Software Symposium, and local Java user groups.
Besides JavaFX, he has a wide range of technology interests including Java, OSGi, Scala,
BugLabs, Arduino, SunSPOT, and any other interesting projects running on the JVM. You
can follow Vladimir through his blog:
Twitter:
and LinkedIn: />in/vvivien
.
Firstly, I want to thank my wife for her support, especially during the crunch
period when I would lock myself in my ofce for hours to nish a chapter.
I also want to thank everyone who offered kind and encouraging words
that kept me going when I wanted to literally walk away from the project.

A special shout out goes to Sarah Cullington, my editor, who is the reason
that this book exists. Thank you, Sarah, for not giving up on the project
despite its many setbacks. Thanks to the entire Packt Publishing team
for taking the risk in a new author like myself, and in a nascent technology
like JavaFX.

Finally, I must give a shout out to to the Sun team, who saw the need for a
declarative language for rich client development on the VM, and seized the
opportunity to bring JavaFX to life. Although JavaFX is new in this space,

thanks to the hard work of these dedicated engineers, JavaFX is a complete
platform with a complete toolset for developing rich and engaging visual
applications on the JVM.
www.it-ebooks.info
About the Reviewers
Anghel Leonard is a senior Java developer with more than 12 years of experience
in Java SE, Java EE, and the related frameworks. He wrote and published more than
20 articles about Java technologies, and more than 100 tips and tricks. He also wrote
two books about XML and Java (one for beginners and one for advanced readers), and
one about JBoss Tools 3.0, with Packt Publishing. During this time, he developed web
applications using the latest technologies on the market. In the past two years, he has
been focused on developing RIA projects for GIS elds. He is interested in bringing as
much desktop as possible to the Web; therefore, GIS applications represents a real
challenge for him.
Luca Masini is a Senior Software Engineer and Architect, who started as a game
developer for Commodore 64 (Football Manager) and Commodore Amiga (Ken il
guerriero). He soon turned to object-oriented programming, and for that, he was
always attracted by the Java language, right from its beginning in 1995.
After having found his passion, he worked as a consultant for major Italian banks,
developing and integrating the main software projects for which he often took technical
leadership. He was able to adopt Java Enterprise in an environment where COBOL was
the agship platform, converting it from mainframe-centric to distributed.
He then set his eyes upon open source technologies, starting from Linux and then
with enterprise frameworks, with which he was able to introduce some low-impact
concepts, such as IoC, ORM, MVC, and so on. For the the same reason, he was also
an early adopter of Spring, Hibernate, Struts, and a whole host of other technologies
that, in the long run, have given his customers a technological advantage, and
therefore a development cost-cut.
www.it-ebooks.info
Lately, however, his attention has been completely directed towards the simplication and

standardization of development with Java EE, and for this reason, he is working at the
ICT of a large Italian company to introduce advanced build tools (Maven and Continuous
Integration), archetypes of project, and Agile Development with plain standards.
He has worked on the following books (from Packt):
f Google Web Toolkit
f Spring Web Flow 2
f Spring Persistence with Hibernate
Gaga tu sei qui. Ah tu non fuggi. Tu mi risponderai no all'ulitmo grido.
Meenakshi Verma has been a part of the IT industry since 1998. She is experienced
in putting up solutions across multiple industry segments using SAP BI, SAP Business
Objects, and Java/J2EE technologies. She is currently based in Toronto, Canada, and
is working with Enbridge Gas Distribution.
Meenakshi has been helping with technical reviews for books published by Packt
publishing across varied enterprise solutions. Her earlier works include JasperReports
for Java Developers, Java EE 5 Development using GlassFish Application Server, Practical
Data Analysis and Reporting with BIRT', and EJB 3 Developer's Guide, Learning DOJO.
I'd like to thank my father (Mr. Bhopal Singh) and mother (Mrs. Raj Bala) for
laying a strong foundation in me and giving me their unconditional love and
support. I also owe thanks and gratitude to my husband (Atul Verma) for his
encouragement and support throughout the review of this book, and many
others: my four year old son (Prieyaansh Verma) for giving me the warmth
of his love despite my hectic schedules, and my brother (Sachin Singh) for
always being there for me.
www.it-ebooks.info
www.it-ebooks.info
www.it-ebooks.info
This book is dedicated to my son MJV: his smile is my daily inspiration.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents

Preface 1
Chapter1:GettingStartedwithJavaFX 7
Introduction 7
InstallingtheJavaFXSDK 9
SettingupJavaFXfortheNetBeansIDE 11
SettingupJavaFXfortheEclipseIDE 16
UsingjavafxctocompileJavaFXcode 19
CreatingandusingJavaFXclasses 22
CreatingandusingvariablesinJavaFX 25
Usingbindingandtriggerstoupdatevariables 28
CreatingandusingJavaFXfunctions 32
IntegratingyourJavaFXcodewithJava 35
CreatingandusingJavaFXsequences 37
WorkingwithJavaFXString 41
Chapter2:CreatingJavaFXApplications 45
Introduction 45
BuildingaJavaFXapplication 46
Drawingsimpleshapes 50
CreatingcomplexshapesusingPath 55
Creatingshapeswithconstructiveareageometry 57
DrawinglettershapesusingtheTextclass 60
Handlinguserinput 64
Arrangingyournodesonstage 67
Makingyourscriptsmodular 70
Creatingyourowncustomnode 73
Controllingyourapplication'swindowstyle 76
Goingfull-screen 79
www.it-ebooks.info
ii
Table of Contents

Chapter3:Transformations,Animations,andEffects 81
Introduction 82
ModifyingshapeswiththeTransformationAPI 82
CreatingsimpleanimationwiththeTransitionAPI 85
ComposinganimationwiththeTransitionAPI 89
BuildinganimationwiththeKeyFrameAPI 93
Creatingcustominterpolatorsforanimation 100
MorphingshapeswiththeDelegateShapeclass 102
Usingdatabindingtodriveanimationsequences 104
Applyingcoolpainteffectswithgradients 107
CreatingyourowncustomizedPaint 109
Addingdepthwithlightingandshadoweffects 111
CreatingyourownTexteffect 114
AddingvisualappealwiththeReectioneffect  116
Chapter4:ComponentsandSkinning 119
Introduction 119
CreatingaformwithJavaFXcontrols 120
DisplayingdatawiththeListViewcontrol 125
UsingtheSlidercontroltoinputnumericvalues 128
Showingprogresswiththeprogresscontrols 131
CreatingacustomJavaFXcontrol 134
EmbeddingSwingcomponentsinJavaFX 139
StylingyourapplicationswithCSS 143
UsingCSSlestoapplystyles 148
SkinningapplicationswithmultipleCSSles 152
Chapter5:JavaFXMedia 157
Introduction 157
Accessingmediaassets 158
LoadinganddisplayingimageswithImageView 159
Applyingeffectsandtransformationstoimages 163

Creatingimageeffectswithblending 167
PlayingaudiowithMediaPlayer 172
PlayingvideowithMediaView 175
Creatingamediaplaybackcomponent 179
Chapter6:WorkingwithData 185
Introduction 185
SavingdatalocallywiththeStorageAPI 186
AccessingremotedatawithHttpRequest 189
DownloadingimageswithHttpRequest 192
PostingdatatoremoteserverswithHttpRequest 196
www.it-ebooks.info
iii
Table of Contents
UploadinglestoserverswithHttpRequest 200
BuildingRESTfulclientswiththePullParserAPI 204
UsingtheFeedAPItocreateRSS/Atomclients 213
VisualizingdatawiththeJavaFXchartAPI 220
Chapter7:DeploymentandIntegration 225
Introduction 225
BuildingandpackagingyourappwithanIDE 227
Buildingandpackagingyourappwithjavafxpackager 229
PackagingyourapptobeWebStart(ed) 232
Packagingyourappasanapplet 237
PassingargumentstoJavaFXapplications 242
Makingyourappletsdrag-to-install 245
ControllingJavaFXappletsfromJavaScript 250
Chapter8:TheJavaFXProductionSuite 259
Introduction 259
Loadingmultipleimagesdynamically 260
ExportingAdobePhotoshopgraphicstoJavaFX 265

ExportingAdobeIllustratorgraphicstoJavaFX 269
ExportingScalableVectorGraphics(SVG)toJavaFX 274
UsingobjectsloadedfromFXZles 277
AppendinA:MobileJavaFX 285
AppendinB:JavaFXComposer 287
AppendinC:JavaFXProductsandFrameworks 289
AppendinD:BestPracticesforDevelopment 291
AppendinE:BestPracticesforDeployment 295
Index 299
www.it-ebooks.info
www.it-ebooks.info
Preface
This book is a collection of code recipes, examples, and informative discourses designed
to enable the reader to get started with creating JavaFX application quickly. The book is
arranged as a series of loosely related code recipes that a reader can easily select to t
his or her needs. It exposes readers to a great variety of topics designed to satisfy different
skill levels. Readers will learn about the language, animation techniques, paints, effects,
JavaFX controls, integration of Swing components, styling with CSS, audio/video, deployment
practices, and JavaFX integration with Adobe design tools.
What this book covers
Chapter 1, Getting Started with JavaFX This is the "getting started" chapter of the book. It
provides introductory materials to the platform, including installation instructions to get your
environment set up. It also covers language basics such as classes, data types, function
usage, variable declaration, data binding, triggers, Java and JavaFX integration.
Chapter 2, Creating JavaFX Applications This chapter covers the essential building blocks
of the JavaFX application framework, including primitive shapes, path, text, constructive area
geometry, mouse/keyboard input, custom node, and window styling.
Chapter 3, Transformations, Animations, and Effects This chapter explores the animation
capabilities supported in JavaFX. You start with the Transition API to quickly build simple
animations. The material continues to cover the KeyFrame API for more advanced animation

sequences. You will learn about colors, effects, and how to create your own custom paint
and effects.
Chapter 4, Components and Skinning This chapter is divided into two sections. The rst
section shows readers how to use the set of standard JavaFX controls. The chapter also
shows how to embed Swing components in your JavaFX scene graph. You will also learn how
to create your own custom visual controls. The second section of the chapter introduces the
reader to JavaFX's support for CSS. The reader will learn how to style controls using inline
and externalized CSS to create skins.
www.it-ebooks.info
Preface
2
Chapter 5, JavaFX Media One of the exciting features of JavaFX is its inherent support for
multimedia. JavaFX includes support for rendering of images in multiple formats and support
for playback of audio and video on all platforms where JavaFX is supported. In this chapter,
readers learn how to display and manipulate images using the Image API. They will also learn
how to playback both audio and video using the Media API. The chapter shows also how to
create practical custom playback controls.
Chapter 6, Working with Data JavaFX provides superb support for accessing and
manipulating data both locally and remotely. In this chapter, readers are introduced to the
Storage API for local data storage. It provides extensive coverage of JavaFX's HttpRequest API
for accessing data on remote web servers. Readers will learn how to use JavaFX's XML and
JSON parsers to build RESTful client mashups using popular services such as Google Map,
Yahoo Weather, and Zillow Listing. Finally, the chapter explores JavaFX's built-in Chart API for
data visualization.
Chapter 7, Deployment and Integration This chapter provides coverage of the deployment
mechanism supported by JavaFX. Readers will learn how to properly build and package their
applications to target the different runtimes supported by JavaFX, including the web browser
and the desktop. Readers learn how to create Java Web Start-ready applications using the
build tools included in the SDK. The chapter shows how to write JavaScript that communicates
with your JavaFX applet while running within the browser.

Chapter 8, The JavaFX Production Suite This chapter covers JavaFX's integral support for
designer tools from Adobe, including Illustrator and Photoshop. Readers are walked through
the process of exporting creative assets using the JavaFX Production Suite plugins available
for these tools. The chapters also shows how to integrate exported objects from Photoshop
and Illustrator into JavaFX.
Appendix A, Mobile JavaFX In this appendix, readers learn about JavaFX's support for mobile
development. You will learn about development techniques to target mobile devices and tool
support available to get your JavaFX app in the mobile space.
Appendix B, JavaFX Composer By the time you get your hands on this book, JavaFX
Composer will be available as part of NetBeans. This appendix introduces the reader
to the tool and its features.
Appendix C, JavaFX Products and Frameworks This appendix introduces the user to the
community support that is developing around JavaFX. Readers learn about several open
source projects and commercial tools available for JavaFX.
Appendix D, Best Practices for Development As the tile of this appendix indicates, readers
will learn about key practices to use when creating JavaFX development.
Appendix E, Best Practices for Deployment This appendix is a continuation of chapter 7. It
discusses practices that should be applied when building and deploying JavaFX applications.
www.it-ebooks.info
Preface
3
What you need for this book
f JavaFX SDK 1.2
ff Java Development Kit (JDK)
ff NetBeans or Eclipse
f JDK 6 update 14 (or later)
Who this book is for
This book is for Java developers, RIA content developers, and graphic designers who want to
build RIAs featuring animations, videos and other feature-rich content. If you have knowledge
of Java, JavaScript, JavaFX components, you can exploit this book to your advantage.

Conventions
In this book, you will nd a number of styles of text that distinguish between different kinds
of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We can include other contexts through the use of
the include directive."
A block of code is set as follows:
<jnlp>

<resources>
<j2se version="1.5+" java-vm-args="-Xmx256M"/>

</resources>

</jnlp>
When we wish to draw your attention to a particular part of a code block, the relevant lines
or items are set in bold:
<jnlp>

<application-desc
main-class="com.sun.javafx.runtime.main.Main">
<argument>MainJavaFXScript=param.demo.Main</argument>
<argument>name=World</argument>
</application-desc>

</jnlp>
www.it-ebooks.info
Preface
4
Any command-line input or output is written as follows:
javafxpackager -src src -appClass params.RuntimeArgsApplet

-appName args-demo
-appVendor "Vladimir Vivien" -appVersion 1.0
-appCodebase "ver/path/to/app/"
-appWidth 640 -appHeight 75
New terms and important words are shown in bold. Words that you see on the screen, in
menus or dialog boxes for example, appear in the text like this: "clicking on the Next button
moves you to the next screen".
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to develop
titles that you really would like to see.
To send us general feedback, simply send an e-mail to , and
mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in
the SUGGEST A TITLE form on www.packtpub.com or e-mail
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide on
www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.
www.it-ebooks.info
Preface
5
Downloading the example code for this book
You can download the example code les for all Packt books you have
purchased from your account at . If you
purchased this book elsewhere, you can visit ktPub.

com/support and register to have the les e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen.
If you nd a mistake in one of our books—maybe a mistake in the text or the code—we would be
grateful if you would report this to us. By doing so, you can save other readers from would like
to see. frustration and help us improve subsequent versions of this book. If you nd any errata,
please report them by visiting selecting your book,
clicking on the let us know link, and entering the details of your errata. Once your errata are
veried, your submission will be accepted and the errata will be uploaded on our website, or
added to any list of existing errata, under the Errata section of that title. Any existing errata can
be viewed by selecting your title from />Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protection of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the location
address or website name immediately, so that we can pursue a remedy.
Please contact us at with a link to the suspected
pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at if you are having a problem with any
aspect of the book, and we will do our best to address it.
www.it-ebooks.info
www.it-ebooks.info
1
Getting Started with
JavaFX
In this chapter, we will cover the following topics:
f Installing the JavaFX SDK
f Setting up JavaFX for the NetBeans IDE
f Setting up JavaFX for the Eclipse IDE

f Using javafxc to compile JavaFX Code
f Creating and using JavaFX classes
f Creating and using variables in JavaFX
f Using binding and triggers to update variables
f Creating and using JavaFX functions
f Integrating your JavaFX code with Java
f Creating and using JavaFX sequences
f Working with JavaFX string
Introduction
Today, in the age of Web 2.0, AJAX, and the iPhone, users have come to expect their applications
to provide a dynamic and engaging user interface that delivers rich graphical content, audio,
and video, all wrapped in GUI controls with animated cinematic-like interactions. They want
their applications to be connected to the web of information and social networks available
on the Internet.
www.it-ebooks.info
Getting Started with JavaFX
8
Developers, on the other hand, have become accustomed to tools such as AJAX/HTML5
toolkits, Flex/Flash, Google Web Toolkit, Eclipse/NetBeans RCP, and others that allow them
to build and deploy rich and web-connected client applications quickly. They expect their
development languages to be expressive (either through syntax or specialized APIs) with
features that liberate them from the tyranny of verbosity and empower them with the ability
to express their intents declaratively.
The Java proposition
During the early days of the Web, the Java platform was the rst to introduce rich content
and interactivity in the browser using the applet technology (predating JavaScript and even
Flash). Not too long after applets appeared, Swing was introduced as the unifying framework
to create feature-rich applications for the desktop and the browser. Over the years, Swing
matured into an amazingly robust GUI technology used to create rich desktop applications.
However powerful Swing is, its massive API stack lacks the lightweight higher abstractions

that application and content developers have been using in other development environments.
Furthermore, the applet's plugin technology was (as admitted by Sun) neglected and failed in
the browser-hosted rich applications against similar technologies such as Flash.
Enter JavaFX
The JavaFX is Sun's (now part of Oracle) answer to the next generation of rich, web-enabled,
deeply interactive applications. JavaFX is a complete platform that includes a new language,
development tools, build tools, deployment tools, and new runtimes to target desktop,
browser, mobile, and entertainment devices such as televisions. While JavaFX is itself built
on the Java platform, that is where the commonalities end. The new JavaFX scripting language
is designed as a lightweight, expressive, and a dynamic language to create web-connected,
engaging, visually appealing, and content-rich applications.
The JavaFX platform will appeal to both technical designers and developers alike. Designers
will nd JavaFX Script to be a simple, yet expressive language, perfectly suited for the
integration of graphical assets when creating visually-rich client applications. Application
developers, on the other hand, will nd its lightweight, dynamic type inference system, and
script-like feel a productivity booster, allowing them to express GUI layout, object relationship,
and powerful two-way data bindings all using a declarative and easy syntax. Since JavaFX runs
on the Java Platform, developers are able to reuse existing Java libraries directly from within
JavaFX, tapping into the vast community of existing Java developers, vendors, and libraries.
This is an introductory chapter to JavaFX. Use its recipes to get started with the platform.
You will nd instructions on how to install the SDK and directions on how to set up your
IDE. The chapter also provides a high-level introduction to the main features of the JavaFX
scripting language such as class creation, variable declaration, data types, JavaFX functional
programming support, sequences, and loops.
www.it-ebooks.info
Chapter 1
9
Installing the JavaFX SDK
The JavaFX software development kit (SDK) is a set of core tools needed to compile, run, and
deploy JavaFX applications. If you feel at home at the command line, then you can start writing

code with your favorite text editor and interact with the SDK tools directly. However, if you want
to see code-completion hints after each dot you type, then you can always use an IDE such as
NetBeans or Eclipse to get you started with JavaFX (see other recipes on IDEs). This section
outlines the necessary steps to set up the JavaFX SDK successfully on your computer. These
instructions apply to JavaFX SDK version 1.2.x; future versions may vary slightly.
Getting ready
Before you can start building JavaFX applications, you must ensure that your development
environment meets the minimum requirements. As of this writing, the following are the
minimum requirements to run the current released version of JavaFX runtime 1.2.
Minimum system requirements
Windows MacOSX Linux/OpenSolaris
f Windows XP (SP3) or
Windows Vista 32-bit
(all editions)
f Java Development
Kit (JDK) 6 Update
13
f Internet Explorer 6,
Firefox 3.0
f Mac OS X version
10.4.1
f Java Development
Kit (JDK) 5 Update
16
f Safari 3, Firefox 3
f Ubuntu 8.04
f OpenSolaris
2009.06
f Java Development
Kit (JDK) 6 Update

13
f Firefox 3.0
f GStreamer Media
Library
How to do it
The rst step for installing the SDK on you machine is to download it from http://javafx.
com/downloads/
. Select the appropriate SDK version as shown in the next screenshot.
www.it-ebooks.info
Getting Started with JavaFX
10
Once you have downloaded the SDK for your corresponding system, follow these instructions
for installation on Windows, Mac, Ubuntu, or OpenSolaris.
Installation on Windows
1. Find and double-click on the newly downloaded installation package (.exe le)
to start.
2. Follow the directions from the installer wizard to continue with your installation.
Make sure to select the location for your installation. The installer will
run a series of validations on your system before installation starts. If the
installer nds no previously installed SDK (or the incorrect version), it will
download a SDK that meets the minimum requirements (which lengthens
your installation).
Installation on Mac OS
1. Prior to installation, ensure that your Mac OS meets the minimum requirements.
2. Find and double-click on the newly downloaded installation package (.dmg le)
to start.
3. Follow the directions from the installer wizard to continue your installation.
4. The Mac OS installer will place the installed les at the following location:
/Library/Frameworks/JavaFX.framework/Versions/1.2.
Installation on Ubuntu Linux and OpenSolaris

1. Prior to installation, ensure that your Ubuntu or OpenSolaris environment meets the
minimum requirements.
2. Locate the newly downloaded installation package to start installation. For Linux, the
le will end with *-linux-i586.sh. For OpenSolaris, the installation le will end
with *-solaris-i586.sh.
3. Move the le to the directory where you want to install the content of the SDK.
4. Make the le executable (chmod 755) and run it. This will extract the content of
the SDK in the current directory.
5. The installation will create a new directory, javafx-sdk1.2, which is your JavaFX
home location ($JAVAFX_HOME).
6. Now add the JavaFX binaries to your system's $PATH variable,
(export PATH=$PATH:$JAVAFX_HOME/bin).
When your installation steps are completed, open a command prompt and validate your
installation by checking the version of the SDK.
$> javafx -version
$> javafx 1.2.3_b36
www.it-ebooks.info

×