Search code examples
javapixelsense

Develop Java applications on Microsoft Surface touch table (pixelsense)


I'm wondering if it is possible to execute a java application (such as a Java Swing or JavaFX app) on a microsoft surface touch table (such as Samsung SUR40 not the surface tablet) aka pixelsense ?

I've been searching all day on the internet and I can't find any info; probably because the answer is NO ? Thanks


Solution

  • Disclaimer - I've not tried this and never used a Pixelsense (and I very much doubt anybody else has either).

    The SUR40 hardware and software specs (e.g. Win 7 on x86 hardware with Radeon HD 6570M graphics) would seem to fit the minimum requirements to at least allow it to run JavaFX applications. As long as it is able to run standard Windows applications and interpret their touch commands, then it should be able to interpret the JavaFX touch events.

    Many things will probably work, but don't expect to be able to fully exploit the Pixelsense capabilities without resorting to something like JNI. Trying to hook JNI calls into the JavaFX event processing system is not something I would recommend for most people.

    Here are the PixelSense features:

    • Direct interaction refers to the user's ability to simply reach out and touch the interface of an application in order to interact with it, without the need for a mouse or keyboard.
    • Multi-touch contact refers to the ability to have multiple contact points with an interface, unlike with a mouse, where there is only one cursor.
    • Multi-user experience is a benefit of multi-touch: several people can orient themselves on different sides of the surface to interact with an application simultaneously.
    • Object recognition refers to the device's ability to recognize the presence and orientation of tagged objects placed on top of it.

    JavaFX has a multi-touch aware API, so "Direct interaction" and "Multi-touch contact" will probably work. JavaFX has no awareness of "Multi-user experience" or "Object recognition", so those features will probably not work without major effort on your part, which is probably not worthwhile for you. So really, you would be losing out on all of the special features which make the Pixelsense unique rather than just a big touch tablet.

    Swing applications are not touch aware, so if you were to try this, JavaFX would be a better starting point than Swing.

    Really, to find out what does and does not work, you will just have to try it yourself and see what works...

    my main question was more "does a microsoft surface table have a jvm to run java applications"

    The SUR40 runs Windows 7. The device will not come with Java pre-installed. Relying on a pre-installed Java runtime on any platform is a risky deployment strategy anyway.

    You can install Java on a Windows 7 device yourself if there aren't many devices you are targeting.

    You can also package your application as a self-contained application (an exe or msi installer for your application which also includes a Java runtime). That way when somebody wants to use your application all they need to do is install it the same way they would any other Windows program, and they don't need to install any additional software. This would be my recommended deployment option in most cases.