I'm using Eclipse Keplero in C++. I've a project that depends on other shared libraries.
To debug the application I've to add manully all dependency libraries, but this is very boring. So I thought that I can update PATH enviorment variable from "Enviorment" in "Run Configuration". I added the followin variable:
PATH:${PATH};${workspace_loc}\library\lib\x64;${BOOST_X64_NATIVE}
BOOST_X64_NATIVE is an os enviorment variable (windows 7). But I've the following message: Reference to undefined variable PATH.
Well how can I set correctly enviorment variables on eclipse in a way I haven't to copy every time all dependencies.
Just adjust the PATH enviorment variable:
On Run Settings -> Enviorment adjust the PATH variable. Note if you want to use an existing enviorment variable you have to use ${env_var:NAME} where NAME is the name of the variable. So to add update the PATH befor the deployment of the program you have to add PATH variable ${env_var:LIBRARY_PATH};${env_var:BOOST_X64_NATIVE};${env_var:PATH}
Related
I am using Yocto, when i run command env, i could see couple of variables have been set. But when I open up /etc/environment, those variable is not in there.
When i set variable in /etc/environment, for example, proxies, it is not reflected to my system.
How can I know where's the environment variable file?
Thank you.
Yocto environment is set by executing oe-init-build-env script. You can add bitbake variables in local.conf file.
I was watching the Android development video and they asked us to install JDK and create JAVA_HOME environment variable.
I already have MyEclipse installed and I previously had setup the PATH variable(giving it the directory of JDK), do I still need a JAVA_HOME variable ??? If yes then why ???
Yes, you do need.
PATH is usually used to lookup the executables so that you haven't to specify the whole path to execute. JAVA_HOME may be used by the scripts or IDEs to lookup libraries. You can specify JAVA_HOME and build path variable basing on it. E.g (depending on OS)
PATH=$PATH;$JAVA_HOME/bin
Short answer, YES, you do need to set JAVA_HOME.
You can read here the difference between each one of them, but I'm pasting the explanations below as well:
JAVA_HOME and JRE_HOME are not used by Java itself. Some third-party programs (for example Apache Tomcat) expect one of these environment variables to be set to the installation directory of the JDK or JRE. If you are not using software that requires them, you do not need to set JAVA_HOME and JRE_HOME.
CLASSPATH is an environment variable which contains a list of directories and / or JAR files, which Java will look through when it searches for Java classes to load. You do not normally need to set the CLASSPATH environment variable. Instead of using this environment variable, you can use the -cp or -classpath option on the command line when using the javac and java commands.
PATH is an environment variable used by the operating system (Windows, Mac OS X, Linux) where it will look for native executable programs to run. You should add the bin subdirectory of your JDK installation directory to the PATH, so that you can use the javac and java commands and other JDK tools in a command prompt window. The JDK installation instructions explain how to set PATH.
If the application you are using is looking for a specific dataset in the JAVA_HOME environment variable and it isn't there, it is not going to be happy.
Other applications might look for the JDK path in the PATH environment variable, but just because you have it there doesn't mean it will work for other applications that need it in a separate variable.
I am not able to set ANT path in Windows 10.
Right click of PC-->Properties-->Advance system setting-->Advance-->Env variable. Clicked on new on variable
Variable name: ANT_HOME
Variable value: C:\Windows\apache-ant-1.10.
Clicked on system variable name set the
path C:\Windows\apache-ant-1.10.1\bin
checked in cmd prompt using ANT
I am getting ANT is not recognized as an internal or external command. I tried with system variable and system path too and in the env path too I have provided path till bin i.e C:\Windows\apache-ant-1.10.1\bin
still not able to install it.
I have a little problem.
I source a script which changes my RedHat environment (PATH, LD_LIBRARY_PATH, etc.i).
When I launch my install with scons, it charges the default Environment from my machine, but not the current that I loaded...
I tried several attempts, but it was not conclusive. Most of the answer on the net are relative to a change on one variable which have to be set in the SConstruct.
How can I tell scons to charge the current Environment, but not the default ?
Thanks in advance !
The SCons way would be to set these environment variables in your SConstruct/SConscripts so that every user would end up with a reproducible build environment.
Take a read of the FAQ for this: http://scons.org/faq.html#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line.
SCons does not automatically propagate the external environment used to execute 'scons' to the commands used to build target files. This is so that builds will be guaranteed repeatable regardless of the environment variables set at the time scons is invoked. This also means that if the compiler or other commands that you want to use to build your target files are not in standard system locations, SCons will not find them unless you explicitly set the PATH to include those locations.
Already found the solution after some more search : env = Environment(ENV = os.environ)
I have extracted this from the book called
Rhomobile Beginner's Guide
Abhishek Nalwaya
Published Jul 2011
on page 18 it says:
Add JAVA_HOME and JAVA_HOME/bin in your environment variable, PATH.
To add this in PATH click on Environment Variables in Advanced Tab of System Property.
Select Path in System variables and add JAVA_HOME and JAVA_HOME/bin to textbox and click Ok.
What should be the value?
It will let you and other applications run Java tools without having to type the whole path.
I disagree about adding JAVA_HOME; I only have JAVA_HOME/bin in my PATH.
Tomcat requires that JAVA_HOME be set properly in order to operate; so do some other Java EE app servers. (I believe WebLogic needs it.)
The value should be the install directory for your JRE or JDK,
Browse your 'program files' folder for a java folder, should look something like:
C:\Progra~1\Java\jdk1.6.xx\
There will be a directory called bin inside it.