//java nation / JAVAONE NEWS /
JavaFX Interfaces with the Xbox Kinect
“Write once, run anywhere” doesn’t have to exclude the cloud. Oracle’s new Java-centric infrastructure service, Oracle Public Cloud, “is based on industry standards
and supports full interoperability with other clouds and your data center.” A look
at the specs reveals what this means. The foundation of Oracle’s cloud is clustered Oracle WebLogic Server 11 g application servers running on the Java Platform,
Enterprise Edition 5 (Java EE 5) stack. The toolkit suite includes Servlet 2. 5, JSP 2. 1,
JSF 2.0, Enterprise JavaBeans 2. 1 and 3.0, JPA 2.0, JAX-WS 2. 1, and JAX-RS 1. 1 (Jersey
1. 9). The architecture is single tenant, with triple mirroring and offsite tape backup,
for greater assurance of data security and integrity. If you’re running an enterprise
Java applications suite and you need higher availability and elastic scalability, consider
Oracle Public Cloud. The service is currently available in limited trial mode.
What can you do with an Xbox Kinect and JavaFX 2.0?
Attendees at Oracle Java Evangelist Simon Ritter’s JavaOne
session “Interfacing with the Interface: JavaFX 2.0,
Wiimote, Kinect, and More” experienced a hint of what’s
possible when Developer Experience Architect for Java
Client Jasper Potts took to the stage for a session-ending
demo. The Kinect has an array of 3-D visualization, audio, and motion sensors
(useful for playing Xbox games). But, it also includes a C++ SDK that provides
programmers with access to data from the sensors.
Ritter and Potts used the OpenNI framework to wrap the Kinect API so it
could be accessed by JavaFX using Java Native Interface. It took some work,
and some tweaks, but ultimately they were able to access 3-D depth data
from the Kinect sensors using this type of JavaFX code:
Jasper Potts
JAVA IN ACTION
JAVA TECH
ABOUT US
context =
Context.createFromXmlFile( config.getKinectXMLConfig(),
scriptNode);
depthGenerator = DepthGenerator.create(context);
DepthMetaData depthMetaData = getDepthGenerator().getMetaData();
userGenerator = UserGenerator.create(context);
width = depthMetaData.getFullXRes();
height = depthMetaData.getFull YRes();
Linda DeMichiel, Java EE 7
specialization lead at Oracle, talked
about moving Java EE into the cloud at
the Java EE 7 Platform keynote.
Jason McGee, chief architect, cloud
computing, at IBM talked about the
challenges of running Java applications
on the cloud at the IBM keynote.
Considering the demo and the JavaFX technology behind it, Potts said,
“This is a cool 3-D application from JavaFX labs. We showed Duke in 3-D and I
got to pretend to be Duke, with the Kinect controller controlling it. It was a lot
of fun and all went well onstage, so I’m really pleased.”
As Ritter illustrated at the start of his presentation, humans have been
interfacing with machines for a very long time (for example, typewriters were
a great invention). Today software developers can apply open source technolo-
gies such as JavaFX to interface with modern instrumentation devices (like the
Kinect). As Ritter said, the thing to do now is “be inspired, go out there, and
build more stuff!”
blog
PHOTOGRAPH BY BOB ADLER