0

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:

  1. Create a .jar file and run it through a child process.

  2. 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.

1

1 Answer 1

-1

as per this answer:

Execute java code on a server

using a .jar is good and can be run through node directly.

Sign up to request clarification or add additional context in comments.

3 Comments

How does this compare to running a native java app? i.e. java app built entirely on java vs. running the jar through a node child process? I'd like to build it using node since that is what I'm most familiar with atm but if it will make it a noticeably worse experience then I'd rather build it on java (JavaFx most likely).
Rather than have an answer that simply links to another Stackoverflow answer, just flag it as a duplicate.
Krease I don't think this is a duplicate because I'm not asking about the steps how. I already know i can do it with a jar file on node (I say that in my question) but I wanted to know if this was a good way to make a java app or if there were clear issues I wasn't seeing. That being said my question is vague and I will reword it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.