java-caller 4.2.0 → 4.3.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 CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Version](https://img.shields.io/npm/v/java-caller.svg)](https://www.npmjs.com/package/java-caller)
5
5
  [![Downloads/week](https://img.shields.io/npm/dw/java-caller.svg)](https://npmjs.org/package/java-caller)
6
6
  [![Downloads/total](https://img.shields.io/npm/dt/java-caller.svg)](https://npmjs.org/package/java-caller)<!-- gh-dependents-info-used-by-start -->
7
- [![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by&message=106&color=informational&logo=slickpic)](https://github.com/nvuillam/node-java-caller/blob/main/docs/github-dependents-info.md)<!-- gh-dependents-info-used-by-end -->
7
+ [![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by&message=104&color=informational&logo=slickpic)](https://github.com/nvuillam/node-java-caller/blob/main/docs/github-dependents-info.md)<!-- gh-dependents-info-used-by-end -->
8
8
  [![CircleCI](https://circleci.com/gh/nvuillam/node-java-caller/tree/master.svg?style=shield)](https://circleci.com/gh/nvuillam/node-java-caller/tree/master)
9
9
  [![Mega-Linter](https://github.com/nvuillam/node-java-caller/workflows/Mega-Linter/badge.svg)](https://github.com/nvuillam/mega-linter#readme)
10
10
  [![codecov](https://codecov.io/gh/nvuillam/node-java-caller/branch/master/graph/badge.svg)](https://codecov.io/gh/nvuillam/node-java-caller)
@@ -207,10 +207,12 @@ class JavaCaller {
207
207
  let allArgs = [];
208
208
  allArgs.push(...javaArgs);
209
209
  if (this.jar) {
210
+ const jarPath = path.isAbsolute(this.jar) ? this.jar : path.join(this.rootPath, this.jar);
211
+
210
212
  allArgs.push(
211
213
  ...[
212
214
  "-jar",
213
- os.platform() === "win32" && windowsVerbatimArguments ? `"${this.rootPath}/${this.jar}"` : `${this.rootPath}/${this.jar}`,
215
+ os.platform() === "win32" && windowsVerbatimArguments ? `"${jarPath}"` : `${jarPath}`,
214
216
  ],
215
217
  );
216
218
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "java-caller",
3
- "version": "4.2.0",
3
+ "version": "4.3.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": [
@@ -46,7 +46,7 @@
46
46
  "mocha": "^11.0.0",
47
47
  "nyc": "^17.0.0",
48
48
  "prettier": "^3.1.0",
49
- "which": "^4.0.0"
49
+ "which": "^6.0.0"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=12.0.0"