java-caller 2.4.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/CHANGELOG.md +0 -37
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"
|
package/CHANGELOG.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [2.4.0] 2020-07-19
|
|
4
|
-
|
|
5
|
-
- Fix additionalJavaArgs issue #13
|
|
6
|
-
|
|
7
|
-
## [2.3.0] 2020-09-05
|
|
8
|
-
|
|
9
|
-
- Support absolute paths in classpath with argument `useAbsoluteClassPaths` and classPath as array of strings ([#12](https://github.com/nvuillam/node-java-caller/pull/12), by [Dan Gowans](https://github.com/dangowans))
|
|
10
|
-
|
|
11
|
-
## [2.2.3] 2020-09-05
|
|
12
|
-
|
|
13
|
-
- Fix Java 8 detection ([#101@npm-groovy-lint](https://github.com/nvuillam/npm-groovy-lint/issues/101))
|
|
14
|
-
|
|
15
|
-
## [2.2.0] 2020-08-29
|
|
16
|
-
|
|
17
|
-
- Fix CLASSPATH on windows in case there are spaces in paths
|
|
18
|
-
- Update License to MIT
|
|
19
|
-
|
|
20
|
-
## [2.1.0] 2020-08-12
|
|
21
|
-
|
|
22
|
-
- Allow to use java-caller to build your own CLI embedding java sources
|
|
23
|
-
- Example projects using module and CLI
|
|
24
|
-
|
|
25
|
-
## [2.0.0] 2020-08-11
|
|
26
|
-
|
|
27
|
-
- Big refactoring to simplify and enhance performances of code checking/installing java version
|
|
28
|
-
- Replace use of deprecated package [node-jre](https://github.com/schreiben/node-jre) by [njre](https://github.com/raftario/njre)
|
|
29
|
-
- Compliance with JDK & JRE from 8 to 14 ([AdoptOpenJdk](https://adoptopenjdk.net/) releases)
|
|
30
|
-
|
|
31
|
-
## [1.1.0] 2020-08-10
|
|
32
|
-
|
|
33
|
-
- Return `javaChildProcess` when `detached` is true, so it can be used to be killed later
|
|
34
|
-
|
|
35
|
-
## [1.0.0] 2020-08-10
|
|
36
|
-
|
|
37
|
-
- Initial version
|