Skip to content

Conversation

@utzcoz
Copy link

@utzcoz utzcoz commented Jan 10, 2025

For example, if JDK is installed by sdkman, it doesn't have jre directory, and libjvm.so is located in $JAVA_HOME/lib/server/libjvm.so.

So this CL just leverages existing approach to search multiple potential paths for libjvm.so when JAVA_HOME doesn't exist on Linux or macOS platforms.

Test it locally with ./test and all tests passed without core dump with the JDK 21 installed by sdkman locally on Ubuntu 24.04.

For example, if JDK is installed by sdkman,
it doesn't have jre directory, and libjvm.so
is located in $JAVA_HOME/lib/server/libjvm.so.

So this CL just leverages existing approach to
search multiple potential paths for libjvm.so
when JAVA_HOME doesn't exist on Linux or macOS
platforms.

Test it locally with ./test and all tests passed
without core dump.

Signed-off-by: utzcoz <utzcoz@outlook.com>
Signed-off-by: utzcoz <utzcoz@outlook.com>
@utzcoz
Copy link
Author

utzcoz commented Jan 10, 2025

Looks like action/setup-java exports JAVA_HOME, and JDK21 uses different path for libjvm.so on Linux. Maybe modifying the GitHub Actions to tests with different JDKs, for example JDK8 and JDK21 can help to catch this issue for future changes.

@utzcoz
Copy link
Author

utzcoz commented Apr 11, 2025

Friendly ping @rpavlik for reviewing. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant