export JAVA_INC=/usr/lib/jvm/java-8-oracle/include
javac -h . HelloJNI.java
Step 2: make the shared library with the name linked in said Java source, and implementing said native method
g++ -std=c++11 -shared -fPIC -I$JAVA_INC -I$JAVA_INC/linux HelloJNIImpl.cpp -o libhello.so
java -Djava.library.path=. HelloJNI