make:makefile-java-and-c
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| make:makefile-java-and-c [2024/01/15 19:21] – odefta | make:makefile-java-and-c [2025/01/02 18:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 67: | Line 67: | ||
| </ | </ | ||
| + | Hello.java: | ||
| + | <code java Hello.java> | ||
| + | public class Hello { | ||
| + | private native void sayHello(); | ||
| + | static { | ||
| + | System.loadLibrary(" | ||
| + | } | ||
| + | public static void main(String[] args) { | ||
| + | new Hello().sayHello(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | <code c hello.c> | ||
| + | #include < | ||
| + | #include " | ||
| + | |||
| + | JNIEXPORT void JNICALL Java_Hello_sayHello(JNIEnv *env, jobject obj) { | ||
| + | printf(" | ||
| + | } | ||
| + | </ | ||
make/makefile-java-and-c.1705346489.txt.gz · Last modified: (external edit)
