Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » pre-build step not working
pre-build step not working [message #939403] Wed, 10 October 2012 18:30 Go to next message
Filter Punk is currently offline Filter PunkFriend
Messages: 3
Registered: October 2012
Junior Member
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:
"${ProjDirPath}/../../../code/apps/smproxy/set_jdk_home.cmd"
I get an error:
"the system was unable to find the specified registry key or value"
Re: pre-build step not working [message #940403 is a reply to message #939403] Thu, 11 October 2012 15:53 Go to previous message
Filter Punk is currently offline Filter PunkFriend
Messages: 3
Registered: October 2012
Junior Member
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.
Previous Topic:Eclipse forgets include paths. Requires rebuilding the project
Next Topic:variable link path
Goto Forum:
  


Current Time: Thu Dec 18 18:34:12 GMT 2014

Powered by FUDForum. Page generated in 0.05775 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software