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

Support passing the JNIEnv pointer to native methods. #2

Closed
chirino opened this issue Feb 24, 2012 · 3 comments
Closed

Support passing the JNIEnv pointer to native methods. #2

chirino opened this issue Feb 24, 2012 · 3 comments

Comments

@chirino
Copy link
Member

chirino commented Feb 24, 2012

No description provided.

@chirino
Copy link
Member Author

chirino commented Feb 24, 2012

The way it will work from java is:

import org.fusesource.hawtjni.runtime.JNIEnv
// ... then declare the native method...
public static final native void foo(JNIEnv env);

it will map to the following native signature:

void foo (JNIEnv *env);

Since the JNIEnv cannot be created from java, java callers just pass a null when calling, it will get replaced with the actual JNIEnv value.

foo(null);

@dchenbecker
Copy link

Looks good. How reasonable would it be to bump the leveldbjni dep on hawtjni to 1.6-SNAPSHOT so that I can finalize the "chunk" changes on my end and submit a pull request?

@chirino
Copy link
Member Author

chirino commented Feb 24, 2012

Go a head and bump it. I will release hawtjni next time we do a leveldbjni release.

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

No branches or pull requests

2 participants