Skip to content

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

Closed as not planned
@neolord0

Description

@neolord0

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.6.0

Electron version

30.5.1

Operating system

macOS 15,2

Last known working Electron Forge version

No response

Expected behavior

I wanted to run a java program from a packaged electron app.

Actual behavior

The packaged electron app runs, but the java module does not work.

Steps to reproduce

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 guide to install and run electron-forge.

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.

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions