Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 2, 2022 16:01
Show Gist options
  • Save BetterProgramming/ac857cac12f97fb59479c18921a37ea9 to your computer and use it in GitHub Desktop.
Save BetterProgramming/ac857cac12f97fb59479c18921a37ea9 to your computer and use it in GitHub Desktop.
@CContext(Headers.class)
public class NativeInterface {
public static class Headers implements CContext.Directives {
@Override
public List<String> getHeaderFiles() {
return Collections.unmodifiableList(
Arrays.asList("header.h")
)
}
}
@CEntryPoint(name="Java_function_in_C")
public static int callJvm(IsolateThread isolateThread, int a) {
// call your actual method here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment