Skip to content
New issue

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

Absolute jar path #104

Open
BrendanC23 opened this issue Jan 13, 2025 · 2 comments · May be fixed by #106
Open

Absolute jar path #104

BrendanC23 opened this issue Jan 13, 2025 · 2 comments · May be fixed by #106

Comments

@BrendanC23
Copy link

I'm trying to use an absolute path to the jar file.

const java = new JavaCaller({
    jar: "F:\\my-path\\file.jar",
});

However, this gets turned into -jar ./F:\my-path\file.jar.

See this line:

https://github.com/nvuillam/node-java-caller/blob/main/lib/java-caller.js#L213

@BrendanC23
Copy link
Author

This can be fixed by changing from ${this.rootPath}/${this.jar} to ${path.join(this.rootPath, this.jar)}. This will automatically handle absolute or relative paths.

@nvuillam
Copy link
Owner

@BrendanC23 agreed :)
Please can you make a the pull request ? :)

@BrendanC23 BrendanC23 linked a pull request Jan 17, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants