Java Desktop Application with HTML 5 UI based on Electron and Vaadin
- Node JS
- Electron
- Gradle
- JDK 8
- Jetty HTTP Server
- Vaadin Framework
- Jetty server with Web Sockets enabled
- Vaadin UI code in plain Java
- Bi-directional WebSocket connection with Vaadin Push and Jetty WebSocket module
- Two way communication between Electron and web application using javascript functions
- Auto start / stop of server side on application init / exit
- Custom window header
-
Download and install
npm
from https://nodejs.org/en/download/ -
Install required
npm
modules:> cd electron-src > npm install > cd ..
-
Build java application:
Windows
> gradlew bundle
OS X
> ./gradlew bundle
Windows
> electron-app-debug.bat
OS X
> ./electron-app-debug.bin
-
Install electron-packager:
> npm install electron-packager -g
-
Build standalone app:
Windows
> electron-app-package.bat
Application will be bundled to
electron-src\electron-vaadin-win32-x64
OS X
> ./electron-app-package.bin
Application will be bundled to
electron-src/electron-vaadin-darwin-x64