This is a quick intro to OpenJDK's Project Panama.
Clean up executables and generated code from jextract.
$ ./clean.sh
Compile a Hello World C program (optional)
$ ./compile_helloworld.c.sh
Run Hello World C program (optional)
$ ./a.out
Generate Java Panama code (from stdio.h)
$ jextract_stdio.h.sh
Run Java Panama Hello World using C functions
$ ./run_HelloWorld.java.sh
Output shows the following:
Hello World! Panama style
Run Java Panama program creating C double.
$ ./run_Primitive.java.sh
Output shows the following:
A slice of 3.141593
Run Java Panama program creating an array of type C double.
$ ./run_PrimitiveArray.java.sh
Output shows the following:
An array of data
1.000000 2.000000 3.000000 4.000000
1.000000 1.000000 1.000000 1.000000
3.000000 4.000000 5.000000 6.000000
5.000000 6.000000 7.000000 8.000000