Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs when using electron rebuilt with "electron-rebuild" #8801

Open
neolord0 opened this issue Jan 24, 2025 · 0 comments
Open

Error occurs when using electron rebuilt with "electron-rebuild" #8801

neolord0 opened this issue Jan 24, 2025 · 0 comments

Comments

@neolord0
Copy link

neolord0 commented Jan 24, 2025

Hello.
I'm trying to use Java with electron.

So, I installed it on my macOS like this:

nvm use 20.18.2

npm install --save java
npm install --save-dev [email protected]

And, I rebuilt electron to connect the two:

npm install --save-dev @electron/rebuild

package.json
  "scripts": {
    "start": "electron .",
    "rebuild": "electron-rebuild -f -w java",
  }

npm run rebuild
node node_modules/java/postInstall.js

After that, when I test the program, it works fine:

npm run start

Finally, to package it, I followed the Quick Setup Guide to install and run electron-builder.
The packaging process completed successfully, and the program runs, but the program terminates at the point where the JAVA module is executed. I think it's because the packaged electron is not rebuilt to link to java.

What should I do? I need help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant