That's already handled by the alternatives framework. You just have to include /usr/lib/jvm/java-1.8.0-openjdk/include. /usr/lib/jvm/java-1.8.0-openjdk is a symlink which goes into the alternatives system which, at the end, points to the right path in the filesystem (e.g. /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-5.b16.fc25.x86_64).