Wrap an existing Java Web Application with Electron without touching your code.
- Node JS
- Electron
- Java VM
- Download and install
npm
from https://nodejs.org/en/download/ - By default the Java web application is required to run on
localhost:8080
(configure if otherwise underelectron-src\main.js:78
). - By default
java
needs to be available via the path variable (configure if otherwise the path in the main.js) - The provided Jar needs to be executable via
java -jar <file>.jar
. - Place your built (Fat-)Jar in the
jar
folder.
- Starts a (Fat-)Jar
- Shows during f.e. Servlet Container startup a loading Animation (can be replaced)
Basically everything but you will need to rebuilt the application most of the time f.e.:
- Logging (under
.\electron-src\main.js:74
) - Loading animation (under
.\electron-src\
replace theloading.html
file) - Loading animation window size (under
.\electron-src\main.js:58-59
) - Application icon (under
.\electron-src\
replace theicon.ico
file) - Main window title (under
.\electron-src\main.js:103
) - Main window size (under
.\electron-src\main.js:104-105
) - Special run parameters to be passed to the jar (under
electron-src\main.js:67
)
> electron-app-debug.bat
> ./electron-app-debug.sh
> electron-app-package.bat
Application will be bundled to output/electron-vaadin-...
(pending on the system you compile on)
> ./electron-app-package.sh
Application will be bundled to output/electron-vaadin-...
(pending on the system you compile on)
> electron-app-package-all.bat
Application will be bundled multiple times for all archs output/electron-vaadin-...
> ./electron-app-package-all.sh
Application will be bundled multiple times for all archs output/electron-vaadin-...