Alright, I spent 3 days trying to figure out how to get the stock image of NOOBS/Raspbian working with JavaFX and the official Raspberry Pi touch screen. I dont know if this has been discussed before/else where but I though Id share my findings to help out others. Sorry for the wall of text!
The major issue was that Raspbian's stock version of JavaFX was not seeing any working touch events with the official Raspberry Pi touch screen.
The first thing I tried was upgrading the version of Java that came with the Raspberry Pi. However, Oracle completely dropped support for JavaFX on ARM with all versions of java except the version bundled with Raspbian. No luck there.
The next thing I did was look in to /dev/input for which event was the touch screen event. Long story short, I found that JavaFX only looks at /dev/input/event0 for its input. If you plug in or have ANY usb/input devices, the events in /dev/input are destroyed and recreated resulting in arbitrary event names. In my case, plugging in my mouse caused the touch screen events to be moved from /dev/input/event0 to /dev/input/event2.
However, you can create a script to move/rename the events so the touch screen events are always /dev/input/event0. All you need to do is figure out which event is the touch screen event (cat /dev/input/eventN) then run "ls -l /dev/input" to get the major and minor numbers of the touch screen event device. After all that, follow the instructions here http://www.jensd.de/wordpress/?p=845
So, now JavaFX in the stock image of Raspbian can see touch screen events. Awesome. However, the stock version of JavaFX still will not recognize ANY touch screen events and will throw the error "lens_input_pointerEvents_handleSync: malformed multi touch event".
The problem here is that the version of JavaFX included with Raspbian is old/has bugs/does not recognize many touch screens. To fix this problem, an upgrade to JavaFX is needed (Lens in JavaFX needs to be upgraded to Monocle). Because Oracle has no updates for JavaFX on ARM we need to use the OpenFX updated implementation. To do that, just follow the instructions here http://harmoniccode.blogspot.co.uk/2014 ... float.html
Thats about it. Also, for the new players here, JavaFX runs in its own framebuffer. Its does not run in a widget/window in X11. You cannot run both X11 and your JavaFX app at the same time. For my purposes this is fine as I have my JavaFX app run in full screen mode (My raspberry pi and its touch screen is a terminal for home management).
To get JavaFXs native touch screen keyboard AND have the above new OpenFX libs work, start your JavaFX app with the following commands. For proper crypto (OpenFX jar interferes with proper crypto libs - ex javax mail will not work/connect) Ive added in sunjce_provider lib explicitly.
sudo java -Dcom.sun.javafx.touch=true -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.vk.adjustwindow=true -Dcom.sun.javafx.virtualKeyboard=javafx -Djava.ext.dirs=/home/pi/armv6hf-sdk/rt/lib/ext -cp .:$JAVA_HOME/jre/lib/ext/sunjce_provider.jar:/home/pi/Downloads/com.your.app.here.jar some.class.path.Main