If you ever need to put HTML/CSS/JS or Web server inside native window

patarapolw

Pacharapol Withayasakpunt

Posted on May 12, 2020

If you ever need to put HTML/CSS/JS or Web server inside native window

That is, webview; but the performance varies. Also, executable sizes.

I know there is Neutralino.js, but some options are not customizable to my liking. Also, I need a complex backend solution anyway, so I created k-neu.

GitHub logo patarapolw / k-neu

Kotlin version of Neutralino.js

Now, putting in a native window is very simple,

Get JAR files here, https://github.com/patarapolw/k-neu/releases

Create config.json and put in alongside the JAR file of your OS.

{
  "title": "app1",
  "url": "index.html",
  "maximized": true
}
Enter fullscreen mode Exit fullscreen mode

Or,

{
  "title": "app2",
  "server": ["java", "-jar", "server.jar"],
  "url": "http://localhost:${PORT}",
  "maximized": true
}
Enter fullscreen mode Exit fullscreen mode

Of course, you can just edit App.kt directly. So that you can run server without multiple JAR files.

Now, you still have to ask the client to install Java Runtime Environment (JRE).

💖 💪 🙅 🚩
patarapolw
Pacharapol Withayasakpunt

Posted on May 12, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related