Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interface QML and Java?

If QML is used for GUI and Java for developing API for a linux based device,How to interface QML with Java?

like image 424
Sripooja Avatar asked Sep 15 '25 10:09

Sripooja


1 Answers

One approach for cross platform integration is using web service. I would probably expose my Java code as a RESTful web service (See JAX-RS) and invoke it from QML using XMLHttpRequest.

It's also worth mentioning Java GUI library such as swing / JavaFX has cross platform capability, so it should still run on Linux (and whichever platform runs Java). You might not need to write QML at all

like image 58
gerrytan Avatar answered Sep 18 '25 09:09

gerrytan