Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Electron apps be integrated with java code?

As node.js still lacks important functionality which exists in Java, I would like to use Java instead of node.js, and create the client using a web language (html, js, css..). Electron is cross platform and so does java so it seems fit to have a solution getting the best of both worlds.

Does someone know of a way to integrate electron with java or have a different solution to the problem?

like image 940
user3807880 Avatar asked Aug 11 '17 15:08

user3807880


People also ask

Can you use Electron with Java?

js, and create the client using a web language (html, js, css..). Electron is cross platform and so does java so it seems fit to have a solution getting the best of both worlds.

What languages can I use with Electron?

Electron uses Chromium and Node.js so you can build your app with HTML, CSS, and JavaScript.

What is Electron Java?

Electron is a popular and open-source JavaScript framework designed as a project by Cheng Zhao and is developed and maintained by GitHub. Electron is primarily used to develop desktop GUI applications that include various web technologies.


Video Answer


2 Answers

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 .

like image 199
emish89 Avatar answered Sep 23 '22 21:09

emish89


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.

like image 23
jreznot Avatar answered Sep 20 '22 21:09

jreznot