Open K0-RR opened 3 years ago
SAP maintaining a fork of JDK ... oh my. That's two corporations having a weird baby.
I think everyone shipping their own version of Java is a massive mistake. This is just further proof of it.
Vanilla Minecraft is tested only with builds shipped by Mojang.
We can add more detection code for this weird stuff, but ultimately, it's the Mojang JRE/JDKs that should be used.
note the lines you linked and commented on are for Windows, the paths for their Windows installer are SOFTWARE\\SapMachine\\JRE
but I think adding more and more obscure vendors is getting stupid
for linux there isn't really any vendor specific scanning, and I don't really think it's needed https://github.com/MultiMC/MultiMC5/blob/fca2e9e44cb44004eec7f47c03b186bd5e44dc32/launcher/java/JavaUtils.cpp#L386-L394
sdkman jvms are typically placed in ~/.sdkman/candidates/java/
, which isn't scanned by MultiMC, which is the issue here if i read correctly.
Scanning JDK's from sdkman might actually be useful. On some Linux distributions its a major inconvenience to manage multiple JDK installations. Sdkman usually helps in this case, and since its a single function call in the MultiMC code, it should be fine.
To make this clear, the proposed behavior is not specific to any SAP JDK. but the way sdkman installs its software.
afaik on Linux it just looks for java installs in /lib and /opt.
Operating System
Linux
Description of bug
Additionally, I think this file lacks some code for the detection of Sapmachine JDK so I added a comment here. https://github.com/MultiMC/MultiMC5/blob/fca2e9e44cb44004eec7f47c03b186bd5e44dc32/launcher/java/JavaUtils.cpp#L238
Steps to reproduce
curl -s "https://get.sdkman.io" | bash
) and refresh (source) your bash sessionsdk install java 17-sapmchn
)Suspected cause
The path where sdkman provided java can be found is
~/.sdkman/candidates/java/
(~/.sdkman/candidates/java/17.0.0-librca/bin/java
).This issue is unique