Hello
Either use Gluegen + JNI, JNA, JNR or the preview or incubated (depending on your version of Java) Foreign memory access API with or without jextract.
I hope that you know how to use IntelliJ IDEA because we provide almost no guidance about this IDE and anyway, I advise you to understand how to do things without any IDE as this is a tool that should help you to work faster but not something that gets in your way when something doesn't work as expected.
This is an example using JNAErator (found with the search engine DuckDuckGo):
https://gist.github.com/kbarros/1428625