EDIT: rewording my question to make it less vague: Would running a java app through a jar file on a node child process be slower than building the gui on Java? To clarify, I'm not asking if node is faster than Java, but if executing a jar through a child process is noticeably worse than running it natively in its own environment.
I have an app, kind of like a calculator that allows bit manipulation and persists data, and I would like to run it through node. The reason for this is because I want to release this as a desktop app and am familiar with React and Electron so I wanted to build the gui with those tools. What is the best way to do this? I have found many approaches but they all seem to be ideal for different situations. My app will not need to communicate to a server to run any code, all of the logic and data manipulation is on the java app, I just want to run it through node so I can create an interface. Here are some of the options I have found:
Create a .jar file and run it through a child process.
Use socket communication and talk on a Port (this looks like its used mostly for server communication but can be used on the same machine so i think it would still solve my problem)
I have also considered re writing the code in node (its not a lot of code so wouldn't take too much time) and also using JavaFx to create the gui, but I only want to resort to these options if they're significantly better that trying to run java code through a node app.