Title: Electron/Java compatiblity? · Issue #379 · joeferner/node-java · GitHub
Open Graph Title: Electron/Java compatiblity? · Issue #379 · joeferner/node-java
X Title: Electron/Java compatiblity? · Issue #379 · joeferner/node-java
Description: I'm trying to create an Electron application that uses Java to access some legacy code. I could get it to work with NW.js, but I can't seem to get it to work with Electron on Windows. Here's what I've done: Installed the windows-build-to...
Open Graph Description: I'm trying to create an Electron application that uses Java to access some legacy code. I could get it to work with NW.js, but I can't seem to get it to work with Electron on Windows. Here's what I...
X Description: I'm trying to create an Electron application that uses Java to access some legacy code. I could get it to work with NW.js, but I can't seem to get it to work with Electron on Windows. Here&...
Opengraph URL: https://github.com/joeferner/node-java/issues/379
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Electron/Java compatiblity?","articleBody":"I'm trying to create an Electron application that uses Java to access some legacy code. I could get it to work with NW.js, but I can't seem to get it to work with Electron on Windows. Here's what I've done:\r\n\r\n- Installed the windows-build-tools npmjs module (that in turns installs Python and the MS VS command line build).\r\n\r\n- Cloned the electron-quick-start and verified that it built and ran correctly on my system.\r\nInstalled the Java module (version 0.80) into package.json. After downloading, it did a successful build process.\r\n\r\n- Removed the node_modules directory and did an npm install again. Again, I can see the Java support files (.cpp) compiling as expected, with no errors.\r\n\r\n- Ran the electron-quick-start again, and it came up with no problems.\r\n\r\n- Added the line const java = require('java') to the main.js of electron-quick-start\r\n\r\n- When I run the sample, I see the following error:\r\n```\r\nApp threw an error during load\r\nError: A dynamic link library (DLL) initialization routine failed.\r\n\\\\?\\C:\\devel\\electron-quick-start\\node_modules\\java\\build\\Release\\nodejavabridge_bindings.node\r\nat process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)\r\nat Object.Module._extensions..node (module.js:598:18)\r\nat Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)\r\nat Module.load (module.js:488:32)\r\nat tryModuleLoad (module.js:447:12)\r\nat Function.Module._load (module.js:439:3)\r\nat Module.require (module.js:498:17)\r\nat require (internal/module.js:20:19)\r\nat C:\\devel\\electron-quick-start\\node_modules\\java\\lib\\nodeJavaBridge.js:21:16\r\nat Object.\u003canonymous> (C:\\devel\\electron-quick-start\\node_modules\\java\\lib\\nodeJavaBridge.js:316:2)\r\n```\r\n\r\n- At this point, I tried installing and running electron-rebuild. When I re-ran the sample, I then got this error:\r\n```App threw an error during load\r\nError: Cannot find module '../build/jvm_dll_path.json'\r\nat Module._resolveFilename (module.js:470:15)\r\nat Function.Module._resolveFilename (C:\\devel\\electron-quick-start\\node_modules\\electron\\dist\\resources\\electron.asar\\common\\reset-search-paths.js:35:12)\r\nat Function.Module._load (module.js:418:25)\r\nat Module.require (module.js:498:17)\r\nat require (internal/module.js:20:19)\r\nat C:\\devel\\electron-quick-start\\node_modules\\java\\lib\\nodeJavaBridge.js:3:21\r\nat Object.\u003canonymous> (C:\\devel\\electron-quick-start\\node_modules\\java\\lib\\nodeJavaBridge.js:316:2)\r\nat Module._compile (module.js:571:32)\r\nat Object.Module._extensions..js (module.js:580:10)\r\nat Module.load (module.js:488:32)\r\n```\r\n- So, I thought maybe at this point, I need to rebuild the Java, so I did the following:\r\n```cd node_modules\\java\r\nnode-gyp rebuild\r\nnpm run postinstall\r\ncd ..\\..\r\n```\r\n\r\nUnfortunately, when I ran the sample, I simply got the first error message again.\r\nAny ideas out there? I feel like I'm really close, but can't quite get the build steps correct.\r\nJohn","author":{"url":"https://github.com/vrmerlin","@type":"Person","name":"vrmerlin"},"datePublished":"2017-02-08T21:52:47Z","url":"https://github.com/joeferner/node-java/issues/379"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cf288306-5cbb-3417-d648-2d1473318127 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C944:3DE870:2653782:354548A:6AFD4178 |
| html-safe-nonce | f5e761f1312164340067a3368e54e3afa4273085915dd4483d6f4da7464f2e02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTQ0OjNERTg3MDoyNjUzNzgyOjM1NDU0OEE6NkFGRDQxNzgiLCJ2aXNpdG9yX2lkIjoiNzY2OTUyMDI4OTA1ODYwMzM4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8622828e63d0a9787ce60096813a3d17e87915e92978a47e2a22da16edd98a40 |
| hovercard-subject-tag | issue:206336213 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/joeferner/node-java/379/issue_layout |
| twitter:image | https://opengraph.githubassets.com/09d7f36a43d0df5223a302beef7dc11019a2055a010b261d6ad3d9a8d585b5fc/joeferner/node-java/issues/379 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/09d7f36a43d0df5223a302beef7dc11019a2055a010b261d6ad3d9a8d585b5fc/joeferner/node-java/issues/379 |
| og:image:alt | I'm trying to create an Electron application that uses Java to access some legacy code. I could get it to work with NW.js, but I can't seem to get it to work with Electron on Windows. Here's what I... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vrmerlin |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/joeferner/node-java git https://github.com/joeferner/node-java.git |
| octolytics-dimension-user_id | 808857 |
| octolytics-dimension-user_login | joeferner |
| octolytics-dimension-repository_id | 3228734 |
| octolytics-dimension-repository_nwo | joeferner/node-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3228734 |
| octolytics-dimension-repository_network_root_nwo | joeferner/node-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width