Adding native method in custom jdk package
Christian Hagedorn
ch-hagedorn at hispeed.ch
Wed Mar 22 16:32:52 UTC 2017
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
More information about the hotspot-dev
mailing list