Closed shinji257 closed 2 years ago
Actually it doesn't use any of the options in the drop down. For me it is choosing Oracle 17.0.3 but if I choose Oracle 15 it is ignored.
I think I found where the issue might be coming from but can't yet figure out how to fix it (but I might be able to bandaid locally). It doesn't seem like dir is set properly from config in JavaRuntime.java. If I got it correctly it is populating information from @Data which is generated via lombok.Data but it seems to use a (seemingly) random java binary rather than the one I selected in the configuration screen.
The Java runtime selected in launcher options is only used as a fallback if no better option can be found. Java 17 is required for minecraft 1.18, and since the launcher can find a valid Java 17 install it uses that instead. If the launcher always used the Java runtime selected in the options it would break either old versions (that require Java 8) or new versions (that require Java 16+).
However, you can still override a specific instance's Java settings by using the Instance Settings menu, accessible by right-clicking on the instance.
Some actions to take off this issue though:
I've changed the behavior in our build to account for what is expected and implemented action 2 that you listed. I'm used to a setup where the launcher option is the global one then I set an instance one as needed as an override however thanks for the clarification on the expected behavior.
When choosing to add an undetected java it doesn't actually use it. Instead it uses an Oracle release (properly detected otherwise) instead.