java-caller 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/java-caller.js +2 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ const {status, stdout, stderr} = java.run(JAVA_ARGUMENTS,JAVA_CALLER_RUN_OPTIONS
|
|
|
50
50
|
| maximumJavaVersion | Maximum java version to be used to call java command.<br/> If the java version found on machine is upper, java-caller will try to install and use the appropriate one <br/> Can be equal to minimumJavaVersion | | `10` |
|
|
51
51
|
| javaType | jre or jdk (if not defined and installation is required, jre will be installed) | | `"jre"` |
|
|
52
52
|
| additionalJavaArgs | Additional parameters for JVM that will be added in every JavaCaller instance runs | | `["-Xms256m","-Xmx2048m"]` |
|
|
53
|
-
| javaExecutable | You can force to use a defined java executable, instead of letting java-caller find/install one
|
|
53
|
+
| javaExecutable | You can force to use a defined java executable, instead of letting java-caller find/install one. Can also be defined with env var `JAVA_CALLER_JAVA_EXECUTABLE` | | `"/home/some-java-version/bin/java.exe"` |
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
### JAVA_ARGUMENTS
|
package/lib/java-caller.js
CHANGED
|
@@ -56,7 +56,7 @@ class JavaCaller {
|
|
|
56
56
|
this.javaType = opts.javaType || this.javaType;
|
|
57
57
|
this.rootPath = opts.rootPath || this.rootPath;
|
|
58
58
|
this.javaCallerSupportDir = `${os.homedir() + path.sep}.java-caller`;
|
|
59
|
-
this.javaExecutable = opts.javaExecutable || this.javaExecutable;
|
|
59
|
+
this.javaExecutable = opts.javaExecutable || process.env.JAVA_CALLER_JAVA_EXECUTABLE || this.javaExecutable;
|
|
60
60
|
this.additionalJavaArgs = opts.additionalJavaArgs || this.additionalJavaArgs;
|
|
61
61
|
this.output = opts.output || this.output;
|
|
62
62
|
}
|
|
@@ -81,7 +81,7 @@ class JavaCaller {
|
|
|
81
81
|
if (javaExe.toLowerCase().includes(".exe") && !javaExe.includes(`'`)) {
|
|
82
82
|
// Java executable has been overridden by caller : use it
|
|
83
83
|
javaExe = `"${path.resolve(javaExe)}"`;
|
|
84
|
-
} else {
|
|
84
|
+
} else if (javaExe === "java") {
|
|
85
85
|
// Check if matching java version is present, install and update PATH if it is not
|
|
86
86
|
await this.manageJavaInstall();
|
|
87
87
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "java-caller",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Library to easily call java from node sources. Automatically installs java if not present",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/nvuillam/node-java-caller#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"debug": "^4.
|
|
39
|
-
"fs-extra": "^
|
|
40
|
-
"njre": "^0.
|
|
38
|
+
"debug": "^4.3.4",
|
|
39
|
+
"fs-extra": "^10.1.0",
|
|
40
|
+
"njre": "^0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"babel-
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"mocha": "^
|
|
43
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
44
|
+
"eslint": "^8.27.0",
|
|
45
|
+
"mocha": "^10.1.0",
|
|
46
46
|
"nyc": "^15.1.0",
|
|
47
|
-
"which": "^
|
|
47
|
+
"which": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=12.0.0"
|