Home Forums Feature Requests Request for Java Reply To: Request for Java

#1301
K. Schmidt
Participant

Hi,

FYI: As recommended before, it is possible to bind the native methods to java using JNI.

I successfully implemented an interface for using the eyetrackers coordinates. Maybe I can share the code, but I have to check if I am allowed to first (copyright). Perhaps for now a short guide is of interest:

1) Create a java class with the native methods: One for each coordinate (=4) and one to start the tracking and if needed, one to stop it.
2) Generate the header file (e.g. using javah)
3) Create your c/c++ – code:
For me, the MinimalTracker sample was helpful. To start and stop the tracking, the main()-method provides all needed information. Note that xsleep will not work in jvm. The coordinates can be passed to the JNIExport-Methods.
4) Build it as .dll
5) include the .dll and the TobiiGazeCore__.dll in your java project.

Greetings