The «Udev: Failed to write to /sys/class/input/mice/uevent – Check that you have permission to access input devices» occurs when you execute a JavaFX application on a Raspberry Pi using a «normal» user (not root).
The underlying problem is the use that JavaFX do with the device hardware: it requires ‘write’ access to them directly.
To avoid the problem just execute your command using «sudo» or -better- modify the system settings to grant write access to the devices all users that belongs to the «input» group.
To do so just edit the 99-com.rules file:
sudo nano /etc/udev/rules.d/99-com.rules
And paste this script at the bottom of the file:
SUBSYSTEM=="input*", PROGRAM="/bin/sh -c '\ chown -R root:input /sys/class/input/*/ && chmod -R 770 /sys/class/input/*/;\ '"
Press control+X and save the changes.