In a C++ project, which is using JNI (JavaNativeInterface), I need to include <jni.h> which is located in "JDK_PATH"/include.
I am trying to find out systems current jdk-version and its path with a dos script "set_jdk_home.cmd" (attached to this message), which uses the "reg query" command.
If I call this script from Windows-CMD it returns the correct jdk path: C:\Program Files\Java\jdk1.7.0_07.
If I run the same script as pre-build step like this:
I get an error:
"the system was unable to find the specified registry key or value"
I found out that for some reason, that the command "reg query", which I use in my script has no access to HKEY_LOCAL_MACHINE if I run this script from within eclipse.
It does work, if I use HKEY_CURRENT_USER.
Well, that explains the error but does not help me at all, in solving my problem.
All I need is to have a variable for a link path. If you know how to achieve that with eclipse, please read my new message.