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

java: statically load JNI library #557

Merged
merged 1 commit into from
Mar 23, 2021
Merged

java: statically load JNI library #557

merged 1 commit into from
Mar 23, 2021

Conversation

axic
Copy link
Member

@axic axic commented Oct 19, 2020

This should implement the pattern of storing the shared object in the JAR file, copying it to a temp folder, and loading it from there.

private ByteBuffer nativeVm;

static {
System.loadLibrary("evmc-java");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, we need copy the shared library out of the JAR into some temporary directory and load from there. See #532 (comment)

@atoulme atoulme mentioned this pull request Oct 24, 2020
@axic axic force-pushed the java-loader branch 3 times, most recently from 5007dea to f6fd869 Compare March 23, 2021 11:34
@axic axic marked this pull request as ready for review March 23, 2021 11:34
@axic
Copy link
Member Author

axic commented Mar 23, 2021

Pulled in all the changes from #559.

@axic axic requested review from chfast and atoulme March 23, 2021 11:35
Also package both the JNI binding and the example VM in the JAR.

Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
Copy link
Collaborator

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chfast chfast merged commit 9bf701b into master Mar 23, 2021
@chfast chfast deleted the java-loader branch March 23, 2021 11:53
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.

3 participants