Here's an example of using C code from Java, via GraalVM.
I want to run the xxHash algorithm for some reason (I don't know anything about this algorithm, I just know I found a single-file C implementation of it). There's a Java port, but let's say there isn't for the sake of argument, so I want to run the original C version rather than doing the port myself.
I clone it from https://github.com/Cyan4973/xxHash.
I can then compile the native version.