This question is now pretty old, but probably someone will stumble across this in the future.
As @Gyro Gearless already mentioned, you need to specify the "Include directories".
For Java 8 on Ubuntu 15.04 I found the folders at
- /usr/lib/jvm/java-1.8.0-openjdk-amd64/include
- /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux
In this directories you can find the following header files:
- classfile_constants.h
- jawt.h
- jdwpTransport.h
- jni.h
- jvmticmlr.h
- jvmti.h
which are needed by the compiler to include.
If you are using Netbeans you can add those include directory via the properties of your project: