This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order for this to run in an Electron app there must be a JRE present. The current solution is to use this [node-jre](https://www.npmjs.com/package/node-jre) module to download the jre. I do this as a step in my actually app and unzip the jre in a directory "jre" at the top level of my project (make sure to configure your package.json to include this directory). If you do this then the current set up in this repo should allow you to call Java code in a packaged electron app.
TODO: What should probably happen is that this module should depend on node-jre and the library should link to the jre downloaded in this module.
NOTE: only tested on Windows and MacOS
## Manual compile (Using node-gyp)
Expand All
@@ -64,7 +71,7 @@ npm test
_NOTE: You will need node-gyp installed using "npm install -g node-gyp"_
* `promisify` Callback-to-promise transform implementation. From Node.js version 8 one can just use Node.js implementation: `promisify: require('util').promisify`.
* `ifReadOnlySuffix` See [Static Member Name Conflicts](#staticMemberNameConflicts).
See [Async Options](#asyncOptionsDetails) for details.
See [Async Options](#asyncOptionsDetails) for details.
## import
Expand Down
Expand Up
@@ -559,7 +566,7 @@ __Example__
*java.newArray(className, values[])**
Creates a new java array of given glass type. To create array of primitive types like `char`, `byte`, etc, pass the primitive type name (eg. `java.newArray("char", "hello world\n".split(''))`).
Creates a new java array of given glass type. To create array of primitive types like `char`, `byte`, etc, pass the primitive type name (eg. `java.newArray("char", "hello world\n".split(''))`).
__Arguments__
Expand Down
Expand Up
@@ -694,7 +701,7 @@ __Example__
var thread = java.newInstanceSync("java.lang.Thread", myProxy);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
';jre\\\\jdk-11.0.2\\\\bin\\\\server' //TODO: change this so jdk version is detected
);
} else {
fs.writeFileSync(
jsonfile,
binary
? JSON.stringify(
path.delimiter
+ path.dirname(path.resolve(home, binary))
)
: '""'
);
}
}
});
Expand All
@@ -47,7 +54,7 @@ function removeDuplicateJre(filePath){
}
function _getCorrectSoForPlatform(soFiles){
var architectureFolderNames = {
'ia32': 'i386',
'x64': 'amd64'
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package jdk #1
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
Are you sure you want to change the base?
Package jdk #1
Filter by extension
Only manifest files
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.