Skip to content
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

Zulu JDK failing to load native libs on windows #91

Open
hinerm opened this issue Dec 21, 2022 · 3 comments
Open

Zulu JDK failing to load native libs on windows #91

hinerm opened this issue Dec 21, 2022 · 3 comments
Labels
Milestone

Comments

@hinerm
Copy link
Member

hinerm commented Dec 21, 2022

It looks like the launcher is not configuring the java.library.path in a way that's compatible with the Zulu JDK.

See this forum thread.

@hinerm hinerm added the bug label Dec 21, 2022
@hinerm hinerm added this to the m1 milestone Dec 21, 2022
@mkitti
Copy link
Collaborator

mkitti commented Dec 21, 2022

@mkitti
Copy link
Collaborator

mkitti commented Dec 21, 2022

My theory is that something is getting confused by the inconsistent use of slashes and backslashes. What's strange is that some are reporting that this could be dependent on the shell / command prompt. There is also possible environment variable involvement.

Regarding environment variable involvement we are using putenv:

return putenv(string->buffer);

This is actually deprecated:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv?view=msvc-170

_putenv_s is preferred with regard to the C Runtime:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-wputenv?view=msvc-170
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-s-wputenv-s?view=msvc-170

The problem with Windows is that there is often more than one C Runtime (CRT) lying around. What we really want to do is set it for the entire process tree. In that case we may want to use

SetEnvironmentVariable and GetEnvironmentVariable from the Win32 API:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable

The blocker for me in solving this is that I cannot reproduce the issue yet.

@mkitti
Copy link
Collaborator

mkitti commented Dec 21, 2022

Can someone figure out how to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants