RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Invoke RESTful Web Services from JavaFX

Learn how to access RESTful web services from a JavaFX application.


avaFX, a new Sun Microsystems product family (including a scripting language, JavaFX Script), is optimized for implementing rich Internet applications for desktop and mobile devices. It comes bundled with the latest editions of the Java SE Runtime Environment (JRE) and Development Kit (JDK), and it provides its own API.

Although JavaFX Script uses syntax that somewhat resembles Java and JavaScript, it is important to understand how JavaFX differs from Java. One area in particular where this understanding would be helpful for Java developers who are just beginning to explore JavaFX is RESTful web services invocation. This 10-Minute Solution demonstrates how to invoke RESTful web services from JavaFX, and how to process the results.

As an example, it shows how to call a RESTful web service that provides information about airport departures and arrivals to a JavaFX front end. For the service URL, here is the abridged service data:


How do I call a RESTful web service from a JavaFX application, and how do I process a result?

Invoke a GETRESTful web service method and parse its results into a JavaFX object.

What You Need
JDK 6 Update 11
NetBeans 6.5 for JavaFX 1.0
For Eclipse users: JavaFX Plugin for Eclipse*
Developer References
"Getting Started With JavaFX Technology"
"JavaFX 1.0 API | Overview | Java FX"
* At this point, because of the newness of the product, NetBeans 6.5
provides the best support for JavaFX development.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date