-
Notifications
You must be signed in to change notification settings - Fork 19
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
msopenJdk 11 on CentOS7 causes problems installing operating system openjdk package #445
Comments
hey @MattCodd2, can you share a test case, perhaps using a container image? |
I can describe what's needed to reproduce it, it's a bit of an odd one for a test case as all the interaction is at the OS level. 1/ Create a CentOS 7 vm (or docker image)
3/ Execute the command 4/ Examine the output and note both the OS and the MS repo provide packages that satisfy that requirement 5/ Attempt to install the 6/ Look at the files provided and the locations they install to for each package to see they are different |
If I understand the problem as stated, it is that the Microsoft Build of OpenJDK satisfies the requirements of |
Yes, that's the problem. If you have systems with multiple versions of Java installed then you need to have some way of specifying a particular version is used for a specific application, and the OS build enables this by providing symlinks in /etc/alternatives that point to each version:
The Microsoft package only provides the basic symlink:
which means that any code that uses the more specific symlinks to select particular versions fails. The OS packages also create symlinks in /usr/lib/jvm along the same lines, which aren't replicated by the Microsoft package:
Where the actual packages install to wouldn't be a problem if these links were created |
So the issue is that the Microsoft package does not contain the right set of symlinks to work properly with /etc/alternatives ? |
Is this issue just observed in CentOS7?
I installed the jdk using the JavaToolInstaller@0 taking the openjdk-11 from a storage:
And still the same error: "Could not create the Java Virtual Machine" |
The package |
Yes, I ran SonarQubeAnalyze@5 and it failed with the first jdk that came installed with the image. Then I tried force the jdk-11 installation with the JavaToolInstaller and still get the same error: "Could not create the Java Virtual Machine" |
Partly. Mainly that it doesn't provide the vendor independent symlinks so you cannot simply refer to java-11-openjdk regardless of which package is providing Java |
Can you provide a detailed log of the error you get? |
It's not really something that get logged. After installing OpenJDK 11 the expectation is that java can be accessed using
or any of the other symlinks mentioned above. The symlinks aren't created by the Microsoft openjdk package |
@MattCodd2 your best option here is to extract the JDK into some folder like What I described above is what a "manual" configuration looks like. |
The msopenjdk-11 from the packages-microsoft-com-prod yum repository provides java-11-openjdk-devel which causes problems for systems that require the standard java-11-openjdk-devel package layout as msopenjdk installs to different locations.
The partial yum provides listing below illustrates the issue:
When you do an installation of a package that depends on java-11-openjdk-devel you may get either implementation.
The text was updated successfully, but these errors were encountered: