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.
I added install_path as an option to the install function to let the user be able to specify where njc should download and install the jre. I also had to add the installation path to both executeJar and execute-jar and execute-class-with-cp to be able to use the JRE installed in another location than default.
Default path is till __dirname.
My use case is that I want to be able to use NJC inside of a electron app. But the user is not allowed to access files inside of the electron package (__dirname).
In my solution installPath is passed around alot and needed for both install and execution. I could not come up with a more tidy solution but please have a look if you can figure out a way to reuse the install_path for both install and execution.