Adding native method in custom jdk package (original) (raw)
Christian Hagedorn ch-hagedorn at hispeed.ch
Wed Mar 22 16:32:52 UTC 2017
- Previous message: C/C++ IDE support for HotSpot
- Next message: Adding native method in custom jdk package
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I have created a class Test.java in an own package test.lang inside the jdk ("jdk/src/share/classes/test/lang/Test.java"). Now I wanted to add a native method.
I found out that my header was created inside" build/linux./jdk/gensrc_headers/test_lang_Test.h".
So I have tried to just create a new file inside a new folder "jdk/src/share/native/test/lang/Test.c" including "test_lang_Test.h".
From there I do my JNICALL to the VM like it is done for example in "jdk/src/share/native/java/lang/System.c".
However this still results in a UnsatisfiedLinkError. I am sure I have to do some more steps to link and add it to the build properly. What am I missing?
Best regards,
Christian
- Previous message: C/C++ IDE support for HotSpot
- Next message: Adding native method in custom jdk package
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]