for each project, i able to set environment when i select "run it as" . can i set global environment that all project will inherit when run?
A:
You can set environment variables in a script that starts Eclipse. These should be inherited by all child processes.
[EDIT] Create a small script which contains this:
export JAVA_HOME=....
....path-to-eclipse.../eclipse.exe
Not sure about the ".exe" on Mac. Just put the absolute path of the eclipse executable in the line below the export
and it should work. To make the script executable, use chmod +x scriptname
Aaron Digulla
2009-12-30 15:06:28
can you provide more detail.
cometta
2009-12-30 15:18:00
whether on Linux, MacOSX, or Windows, you can start eclipse from a script or batch file. Inside that script or batch file, prior to launching eclipse, you can set environment variables that will be inherited by the eclipse process. These values will then be the defaults for every process run from eclipse that looks at environment variables.
GregS
2009-12-30 15:31:18
i on MacOS, the point is, i already preset JAVA_HOME in .bash_profile and i able to use it in console. but will eclipse cannot detect it and asking me set it?
cometta
2009-12-30 16:06:25
.bash_profile is only executed for new terminal windows, not for every process you start. See my edits.
Aaron Digulla
2009-12-30 16:10:02