-
Notifications
You must be signed in to change notification settings - Fork 159
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
Is the JDK provider customizable? #316
Comments
We use adoptjdk. Not currently customizable as we need it to work via bash and windows batch scripts. |
Can it be made customizable? Lots of JDK options available from SDKMAN! for example, all of them readily available via downloadable zip 😏 |
sdkman does not have windows jdk's available...not sure its worth the troubles since you would need to have sdk man installed anyway and then you just do to be clear i'm not against making it customizable but doing it for something that won't work crossplatform and require something else to be installed first would increase the complexity quite a lot for very little gain ( at least thats how my perspective is at the moment ). i.e. if there was another API available similar to openjdk that would serve out cross platform SDK's - that would be another story! |
saw that https://www.azul.com/downloads/zulu-community/api/ exists which provides a similar api. Making me wonder that if we were to make jdk provider customizable we might be better of writing a stupidly simple service that just expose enough api for us to get latest java version for a given os with given arch from a given "vendor service" ....allowing one to do:
and have a default provider setting. ...that could work..not sure would ever do it but now the idea is out there. |
related to #1003 |
What is that allowing user to choose a different JDK from within the script, will give to said user? More than just "let the user choose a different provider in a well documented, supported mechanism", how about "user wants and for that user must be able to use an official mechanism within jbang to allow choosing a different JDK provider". And then, what is ? |
@brunoborges I tried reading that comment multiple times but it is not parsing for me. Are you saying we should not provide the capability of enabling choosing another distro/vendor and just stick to one (like today we use adopt) or that jbang shouldn't do it all ? or just asking what the behavior would be or ? Help me parse the question....please :) |
@maxandersen há. Yeah... I am saying that unless there is clarity on what would be the value for allowing end user choosing which JDK to use, then this feature shouldn't be implemented at all. If anything, just let user define JAVA_HOME and jbang consumes from there, or a JDK path with some flag or whatever. But anything more than that, IMO is overkill. |
But I really can't see value in letting the script have information on which JDK to be used. It's not like one JDK will be inherently different than another that the code would not run at all. |
yes, I'm very conscious on not adding something that is better handled elsewhere. Unfortunately some java distributions are "better" than others - especially when it comes to graphics - see processing/processing4#262 note, in all cases jbang will honor system path/java_home before choosing its own managed approach. Thats always be the case exactly for the reason we want user to be able to control it. |
another one, graalvm CE can do a bunch of interesting things not available in other jdks... |
Fair point with GraalVM CE. |
Not all JDK distributions are created equal. JBang already honors JAVA_HOME so if you have a preference for a particular JDK then simply pre-install it. Done. But if you can't pre-install and still want a choice then JBang doesn't let you as it will choose an specific JDK vendor for you (at the moment) without giving you the option to change it. |
There's a new discussion about this goin on here: #1092 The idea that has come out of this is that we could provide a feature where a user could supply a shell script/executable, let's say |
You can actually do this now since #1500, but it's not enabled by default. The easiest way to enable it is to either pass |
How do I tell jbang that I want it to only use the JBang provided JDK, when calling |
@fbricon are you sure your script has |
|
With jbang 0.101.0, JBang detects 11 is incompatible with requested 14, downloads required JDK then provides the path to the JDK as
availableJdkPath is not returned in 0.103.1 |
Which version of jbang works as you expect @fbricon ? |
0.101.0, as per my last comment |
this affects jbang-eclipse/jbang-vscode which relies on the availableJdkPath value to set the proper JDK |
Okey so it's not necessarily about missing download but that info tools does not seem to even add the jdk info to the output. That's definitely a regression. |
Well that's 2 regressions then :-) |
It's not returned because it's not installed :-) And If that information is necessary for the functioning of the plugin, I suggest we make it a multi-step process. I see several options:
|
It is required for it to work similar to how it also fetch dependencies before returning the list of deps? |
Ok, we'll make |
The readme does not give out details how the JDK is chosen nor from which location.
Is it always the same provider? If so, can it be customized?
The text was updated successfully, but these errors were encountered: