Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

398
Views
Multi-touch cross platform java application (Windows, Mac, and Linux(Ubuntu)(possibly Android))

Am trying to add multi-touch to an existing cross platform java project. I have looked in to 2 ways. There was several other ways but they seemed to not be cross platform or needed special software.

  1. JavaFx - Working gesturing/touchevent events on windows and osx but not functioning on Ubuntu 16.04.
  2. MT4J - Looks to be discontinued and/or unsupported.

My conclusions for the above could be wrong and am willing to try them again given good feedback.

Is there anyway to achieving a cross platform multi-touch java application? Seems I may need to write some native code and add it through the JNI which seems like a lot of work. Any ideas on this line of thought?. Feed back is appreciated, Thanks.

Continuation 1.0:

I have kept investigating using JavaFX on linux mostly because the only drawback right now for using JavaFX is linux multitouch support. What I have found out is that JavaFx multitouch does work on Linux distributions that are for embedded systems(ex: Raspberry Pi, probably most to be honest). What I can gather from this is if OpenJFX can be compiled for the embedded system then the embedded version of OpenJFX uses the device drivers directly to get input(/dev/input/) instead of the X11/GTK. Since the Linux dists for the desktop use X11/GTK for there input into the desktop environment JavaFx is unable to get these events due to a lack of support.

I don't wish to use a link but here it is

https://wiki.openjdk.java.net/display/OpenJFX/Building+the+OpenJFX+embedded+stack+for+Linux+desktop

The above link, seems to me at-least, to be about compiling a version of the OpenJFX for x86 systems(should work x64) which uses the embedded systems way of getting device input. I'am able to compile this version but when I run it appears to crash the Desktop and sometimes it does leave the Java App up. When the Java App is left running touch events do work but this end result is just not acceptable because it is unpredictable and seems to crash the desktop manager(Requires a reboot of the desktop after this).

Continuation 1.1:

I looked into using TUIO but none of the sample programs worked. They say you need a TUIO enable device which might be a special standard/protocal my devices don't use. Pretty much just downloaded the TUIO demo and ran it on a touch screen with no luck.

I also thought about attaching xev to my java application window and streaming the results to a file to latter be read by the java application and parsed into java events. This seems pretty hacky and am not sure if it would even work. If someone would lay out the possibility of this working I may try it. But at this point it seems like way to much work.

Continuation 1.2:

Found this https://bugs.openjdk.java.net/browse/JDK-8090954 and thought it was interesting.

Posted the solution below.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Recently there has been many cross platform project generators

React native, Cordova are some of those

I have used React Native .It uses javascript codes which are compiled down according to the platform

React native has support for Gesture Control programming

https://facebook.github.io/react-native/docs/gesture-responder-system.html

you can also interface the react portion of code with the existing JAVA code for the app which you have already written

https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
about 4 years ago · Santiago Trujillo Report

0

The solution was to use TUIO and roll our own Multi-Touch library. The trick was starting the TUIOClient and runing a TUIO server. The TUIOClient listens on a given port and the TUIO server forwards OS events to the port the TUIO client is listening on.

I used the mtdev2tuio server(output bridge) for linux and ran it along side a TUIO client.

Example Flow:

1.) TUIOClient listening on port x

2.) TUIOServer forwarding TUIO events to port x from os events y

Linux:

1.) new TUIOClient(3333)

2.) ./mtdev2tuio /dev/input/event5 osc.udp://127.0.0.1:3333

The solution isn't ideal but it works and should support multi-touch on any device provided there is a TUIO server(Output Bridge) running. Another downside is one needs to capture touches and interpret them into gestures. Also note depending on how it is developed dictates how you use it in different frameworks. Ours will need to be used in Swing/JavaFX.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!