Skip to content

Java has a vast ecosystem, market, and developer community. This document will introduce how to integrate a Java project into a desktop application.

Preparation

  1. Download the project
bash
# gitee
git clone https://gitee.com/dromara/electron-egg.git

# github
git clone https://github.com/dromara/electron-egg.git
  1. Switch to the demo branch
bash
git checkout -b demo-java remotes/origin/demo
  1. Install frontend and Electron dependencies
bash
# Install Electron dependencies in the root directory
npm i

# Enter the frontend directory and install dependencies
cd ./frontend 
npm i

Download Demo Resources

  1. jre and jar
  • URL: java-res.zip
  • Please select the correct jre according to your operating system and extract it
  1. Extract jre to the build/extraResources directory

Note: Official jre download URL: Oracle Java

Run

bash
npm run start

Check the cross menu in the demo for the Java service.