最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to create Javascript executable? - Stack Overflow

programmeradmin4浏览0评论

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.

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.

Share Improve this question asked Nov 9, 2016 at 5:53 LivinthaLivintha 711 gold badge1 silver badge3 bronze badges 2
  • You do understand how Web applications work, do you? – Rax Weber Commented Nov 9, 2016 at 5:56
  • you can package it as an Electron app. – nicholaswmin Commented Nov 9, 2016 at 5:57
Add a ment  | 

4 Answers 4

Reset to default 3

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

If this is to be piled and run on Windows installations only then here's your answer: https://msdn.microsoft./en-us/library/7435xtz6(v=vs.100).aspx

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.

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.

发布评论

评论列表(0)

  1. 暂无评论