Reputation: 71
I want to create JavaScript exe file. On clicking of exe file, It should open my reactJS web application in web browser. From JS exe file, I have to pass query param to Web application. Please help me with code.
Upvotes: 1
Views: 12791
Reputation: 361
You should try jsc.exe (under Windows only), NWJS or Electron.
The latest two are surely your best pick.
Edit: I would add NeutralinoJs to my previous suggestion. It's nice, simple and useful.
Upvotes: 0
Reputation: 23
Java code is different from JavaScript. They might both be Object Oriented Programming (OOP), but JavaScript is specifically a scripting language. Its impossible to make a .exe file out of JavaScript.
Upvotes: 1
Reputation: 101
If this is to be compiled and run on Windows installations only then here's your answer: https://msdn.microsoft.com/en-us/library/7435xtz6(v=vs.100).aspx
Upvotes: 2
Reputation: 14649
You can create a shell script to launch the browser with a link to your web application that is on your local machine. You haven't given much details, but in general it's pretty easy.
cat > launch.exe
#!/bin/bash
$BROWSER http://localhost
chmod +x launch.exe
./launch.exe
Upvotes: 3