-2

Javascript is inaccurate, but I need a very precise answers to a quartic equation. I want to slove it with c++, that i compiled into an exe file and will update the answers in a javascript file that I include in the HTML. I need to run the exe file that is in the same folder as the .html file on the server, and pass 5 parameters to it. It will update the javascript file, but I have no idea how to run that exe file. Can anyone help me?

----EDIT----

Thanks @Quentin webassembly worked!

4
  • Does this answer your question? How to execute shell command in Javascript Commented Sep 7, 2022 at 17:54
  • Have you tried using a more accurate JS library for floats/integers instead of using C++? github.com/royNiladri/js-big-decimal Commented Sep 7, 2022 at 17:56
  • Consider Webassembly if you need high performance number crunching. Commented Sep 7, 2022 at 17:57
  • The description of the overall process seems vaguely cobbled together without much understanding of web applications in general. Are you looking for end users to execute your application on their machines? Or would they trigger it to be executed on your server and they see the results? Or are you not serving end users at all and this is all for personal (local) use? Something else? It's not really clear to me what your overall UX goals are. Commented Sep 7, 2022 at 17:59

1 Answer 1

1

You can't. That would be a severe security vulnerability, if any random web page could execute any random file on your computer.

So, web pages can't execute files on your computer.

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

2 Comments

I want to execute a file on the HOST machine, the server.
@ÁgostonKis Ah, then it depends on the web server software. Web servers are allowed to do whatever they want, but you have to set them up to do what you want. Which server software do you use?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.