jreznot / electron-java-app Goto Github PK
View Code? Open in Web Editor NEWElectron Java application - What if you could build Desktop applications on Java with HTML 5 UI
License: Apache License 2.0
Electron Java application - What if you could build Desktop applications on Java with HTML 5 UI
License: Apache License 2.0
When building the app with windows 64bit I run into this issue that the server could not start. I figured out, that a line in electron-vaadin.bat is too long. It is where you set the classpath:
set CLASSPATH=%APP_HOME%\lib\electron-java-app-0.2.jar;%APP_HOME%\lib\vaadin-core-14.1.17.jar;%APP_HOME%\lib\javax-websocket-server-impl-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-annotations-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-plus-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-webapp-9.4.27.v20200227.jar;%APP_HOME%\lib\websocket-server-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-servlet-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-security-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-server-9.4.27.v20200227.jar;%APP_HOME%\lib\websocket-servlet-9.4.27.v20200227.jar;%APP_HOME%\lib\javax.servlet-api-3.1.0.jar;%APP_HOME%\lib\logback-classic-1.2.3.jar;%APP_HOME%\lib\jetty-continuation-9.4.27.v20200227.jar;%APP_HOME%\lib\flow-html-components-2.1.5.jar;%APP_HOME%\lib\flow-data-2.1.5.jar;%APP_HOME%\lib\flow-dnd-2.1.5.jar;%APP_HOME%\lib\flow-server-2.1.5.jar;%APP_HOME%\lib\flow-push-2.1.5.jar;%APP_HOME%\lib\flow-client-2.1.5.jar;%APP_HOME%\lib\vaadin-lumo-theme-2.1.5.jar;%APP_HOME%\lib\vaadin-material-theme-2.1.5.jar;%APP_HOME%\lib\vaadin-accordion-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-app-layout-flow-2.0.4.jar;%APP_HOME%\lib\vaadin-button-flow-2.0.2.jar;%APP_HOME%\lib\vaadin-checkbox-flow-2.0.3.jar;%APP_HOME%\lib\vaadin-combo-box-flow-3.0.6.jar;%APP_HOME%\lib\vaadin-date-picker-flow-2.0.6.jar;%APP_HOME%\lib\vaadin-time-picker-flow-2.0.3.jar;%APP_HOME%\lib\vaadin-select-flow-2.0.3.jar;%APP_HOME%\lib\vaadin-dialog-flow-2.0.1.jar;%APP_HOME%\lib\vaadin-details-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-form-layout-flow-2.0.2.jar;%APP_HOME%\lib\vaadin-grid-flow-4.1.0.jar;%APP_HOME%\lib\vaadin-icons-flow-2.0.1.jar;%APP_HOME%\lib\vaadin-iron-list-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-list-box-flow-2.1.1.jar;%APP_HOME%\lib\vaadin-notification-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-ordered-layout-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-progress-bar-flow-2.0.2.jar;%APP_HOME%\lib\vaadin-radio-button-flow-2.0.2.jar;%APP_HOME%\lib\vaadin-split-layout-flow-2.0.3.jar;%APP_HOME%\lib\vaadin-tabs-flow-2.0.4.jar;%APP_HOME%\lib\vaadin-text-field-flow-2.1.0.jar;%APP_HOME%\lib\vaadin-menu-bar-flow-1.0.2.jar;%APP_HOME%\lib\vaadin-upload-flow-2.1.0.jar;%APP_HOME%\lib\vaadin-context-menu-flow-3.1.2.jar;%APP_HOME%\lib\vaadin-login-flow-2.0.0.jar;%APP_HOME%\lib\vaadin-custom-field-flow-3.0.4.jar;%APP_HOME%\lib\ph-css-6.1.1.jar;%APP_HOME%\lib\ph-commons-9.1.2.jar;%APP_HOME%\lib\atmosphere-runtime-2.4.30.slf4jvaadin1.jar;%APP_HOME%\lib\slf4j-api-1.7.25.jar;%APP_HOME%\lib\logback-core-1.2.3.jar;%APP_HOME%\lib\javax.annotation-api-1.3.jar;%APP_HOME%\lib\asm-commons-7.2.jar;%APP_HOME%\lib\asm-analysis-7.2.jar;%APP_HOME%\lib\asm-tree-7.2.jar;%APP_HOME%\lib\asm-7.2.jar;%APP_HOME%\lib\javax-websocket-client-impl-9.4.27.v20200227.jar;%APP_HOME%\lib\websocket-client-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-client-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-http-9.4.27.v20200227.jar;%APP_HOME%\lib\websocket-common-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-io-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-xml-9.4.27.v20200227.jar;%APP_HOME%\lib\javax.websocket-api-1.0.jar;%APP_HOME%\lib\jetty-jndi-9.4.27.v20200227.jar;%APP_HOME%\lib\jetty-util-9.4.27.v20200227.jar;%APP_HOME%\lib\javax.websocket-client-api-1.0.jar;%APP_HOME%\lib\gwt-elemental-2.8.2.vaadin2.jar;%APP_HOME%\lib\commons-fileupload-1.3.3.jar;%APP_HOME%\lib\commons-io-2.5.jar;%APP_HOME%\lib\jsoup-1.12.1.jar;%APP_HOME%\lib\byte-buddy-1.10.1.jar;%APP_HOME%\lib\gentyref-1.2.0.vaadin1.jar;%APP_HOME%\lib\validation-api-2.0.0.Final.jar;%APP_HOME%\lib\vaadin__vaadin-mobile-drag-drop-1.0.0.jar;%APP_HOME%\lib\mobile-drag-drop-2.3.0-rc.1.jar;%APP_HOME%\lib\commons-lang3-3.0.jar;%APP_HOME%\lib\websocket-api-9.4.27.v20200227.jar
gradlew runApp
Task :compileJava
Task :nodeSetup FAILED
FAILURE: Build failed with an exception.
Could not resolve all files for configuration ':detachedConfiguration1'.
Could not find org.nodejs:node:12.14.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/nodejs/node/12.14.1/node-12.14.1.pom
- https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-arm64.tar.gz
Required by:
project :
It would be great to have some description in the REAME about the development process. I can see how I can start the "backend" with the Launcher
, but cannot figure out if it is possible to start the UI separately. Is NPM used for that? Is there some Vaadin-specific build goal?
Hello very neat solution you got here.
I have the following problem I have a "ready to go" packaged jar file with spring boot which you can simply start via java -jar ...
which I want to package with electron, which should be pretty easy with this project.
The existing test application provides it's own source, which does not quite match my own usecase,
and I couldn't find instructions what to do If I only want to use an existing jar. Before diving deep into the scripts I wanted to ask if there might by an easy way to get my usecase running.
Regards.
The produced app bundle can be started from terminal with:
open electron-vaadin.app
.
But if it is double clicked from Finder the app launches but the main window does not show up.
An error in electron-packager
's cli.js
stops the build process (electron/packager#831)
If I manually fix the issue in that js file, it compiles (with gradlew bundleApp
), but when the app starts there's no title bar.
Is it possible to not use vaadin framework and instead use this as a template to build ui with other commonly used libraries like reactjs?
What I mean is, it would look like:
Frontend (ReactJS - Electron Based)
Backend - Java Based
We could get DOM API from GWT Elemental
Hello,
build/bundle eletron-vaadin.exe fails with unhandled exception, due to path issues, when executing from build\bundle\electron-vaadin-win32-x64 directory
main.js serverspawn doesnt take into account resources/app
directory where node script is running:
if (platform === 'win32') {
serverProcess = require('child_process')
.spawn('cmd.exe', ['/c', 'electron-vaadin.bat'],
{
cwd: './electron-vaadin/bin'
});
cwd needs to be changed to:
cwd: ${__dirname}/electron-vaadin/bin
Thanks for great example project, good luck
Hi,
I tried to extend the demo application with an Upload-Component from Vaadin. All went fine, but the encoding of the files seems to be fixed. I want to upload files which also contain german "Umlaute" like "ä, ü, ö", but because of the wrong encoding, it didn't work.
Changing the encoding directly at the Receiver, as suggested in Stackoverflow, did not work.
Because there is no index.html, I also can't set the encoding there.
So where is the best point to change the encoding for the standalone app?
Kind regards
Ronald
Console output:
0:08:43: Executing task 'runApp'...
Starting Gradle Daemon...
Gradle Daemon started in 3 s 361 ms
Task :compileJava UP-TO-DATE
Task :vaadinPrepareFrontend
Task :processResources UP-TO-DATE
Task :classes UP-TO-DATE
Task :jar UP-TO-DATE
Task :startScripts UP-TO-DATE
Task :installDist UP-TO-DATE
Task :buildApp
Task :runApp
Server PID: 10104
Server error: The input line is too long.
The syntax of the command is incorrect.
255
Server stopped unexpectedly with code 255
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Waiting for the server start...
Hi,This is my question.
Use the latest Vaadin 14 LTS release.
Existing problems:
Use Vaadin-Spring add-on https://vaadin.com/directory/component/vaadin-spring
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.