Can Electron apps be integrated with java code? Can Electron apps be integrated with java code? node.js node.js

Can Electron apps be integrated with java code?


I made something similar, Java back-end with Electron GUI.

You can do it in more ways, it depends on what you need.You can create a jar file and then execute it like terminal:

https://nodejs.org/api/child_process.html

Or you can open a socket communication and talk on a Port. (A lot of documentation:Java (web)socket - Node.js client.io)

In this second way, you can do everything you want, but you have to create your communication protocol.

Your path is not foolish, I am very satisfied of the communication and usage in my work with Java + Electron .


I've created a small PoC where Java process is integrated with Electron front-end: https://github.com/jreznot/electron-java-app There you will find a simple TODO List application built with Vaadin/Jetty and Electron.


Personally i made my back-end java communicate with the front-end by creating a file with te data then sending it to the main.js to be processed.